Move secrets_masker patch to conftest and use as fixture - #48901
Closed
gopidesupavan wants to merge 3 commits into
Closed
Move secrets_masker patch to conftest and use as fixture#48901gopidesupavan wants to merge 3 commits into
gopidesupavan wants to merge 3 commits into
Conversation
Member
Author
bugraoz93
approved these changes
Apr 7, 2025
kaxil
reviewed
Apr 7, 2025
kaxil
left a comment
Member
There was a problem hiding this comment.
That still fails for me when I run:
pytest task-sdk/tests --verbosity=0 --strict-markers --durations=100 --maxfail=50 --color=yes --junitxml=/files/test_result-all-none.xml --timeouts-order=moi --setup-timeout=60 --execution-timeout=60 --teardown-timeout=60 --disable-warnings -rfEX --skip-db-tests --ignore-glob=*/tests/system/* --ignore-glob=airflow-core/tests/integration/* --ignore-glob=providers/apache/cassandra/tests/integration/* --ignore-glob=providers/apache/drill/tests/integration/* --ignore-glob=providers/apache/hive/tests/integration/* --ignore-glob=providers/apache/kafka/tests/integration/* --ignore-glob=providers/apache/pinot/tests/integration/* --ignore-glob=providers/google/tests/integration/* --ignore-glob=providers/microsoft/mssql/tests/integration/* --ignore-glob=providers/mongo/tests/integration/* --ignore-glob=providers/openlineage/tests/integration/* --ignore-glob=providers/qdrant/tests/integration/* --ignore-glob=providers/redis/tests/integration/* --ignore-glob=providers/trino/tests/integration/* --ignore-glob=providers/ydb/tests/integration/* --warning-output-path=/files/warnings-all-none.txt --ignore=helm-tests --with-db-init --ignore=providers/cloudant/tests/ -n auto --no-cov --no-db-cleanup
FAILED task-sdk/tests/task_sdk/definitions/test_xcom_arg.py::test_xcom_convert_to_kwargs_fails_task - RuntimeError: Logging Configuration Error! No SecretsMasker found! If you have custom logging, please make sure you configure it taking airflow configuration as a base as explained at https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/logging-tasks.html#advanced-configuration
FAILED task-sdk/tests/task_sdk/definitions/test_xcom_arg.py::test_xcom_map_error_fails_task - RuntimeError: Logging Configuration Error! No SecretsMasker found! If you have custom logging, please make sure you configure it taking airflow configuration as a base as explained at https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/logging-tasks.html#advanced-configuration
FAILED task-sdk/tests/task_sdk/execution_time/test_supervisor.py::TestWatchedSubprocessKill::test_kill_process_custom_signal - RuntimeError: Logging Configuration Error! No SecretsMasker found! If you have custom logging, please make sure you configure it taking airflow configuration as a base as explained at https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/logging-tasks.html#advanced-configuration
FAILED task-sdk/tests/task_sdk/execution_time/test_supervisor.py::TestWatchedSubprocessKill::test_kill_escalation_path[SIGINT-success-without-escalation] - RuntimeError: Logging Configuration Error! No SecretsMasker found! If you have custom logging, please make sure you configure it taking airflow configuration as a base as explained at https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/logging-tasks.html#advanced-configuration
FAILED task-sdk/tests/task_sdk/execution_time/test_supervisor.py::TestWatchedSubprocessKill::test_kill_escalation_path[SIGINT-escalates-to-SIGTERM] - RuntimeError: Logging Configuration Error! No SecretsMasker found! If you have custom logging, please make sure you configure it taking airflow configuration as a base as explained at https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/logging-tasks.html#advanced-configuration
FAILED task-sdk/tests/task_sdk/execution_time/test_supervisor.py::TestListenerOvertime::test_overtime_slow_listener_instance[super_basic_run-hello-2.0-True-listener0] - RuntimeError: Logging Configuration Error! No SecretsMasker found! If you have custom logging, please make sure you configure it taking airflow configuration as a base as explained at https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/logging-tasks.html#advanced-configuration
FAILED task-sdk/tests/task_sdk/execution_time/test_supervisor.py::TestListenerOvertime::test_overtime_slow_listener_instance[super_basic_run-hello-5.0-False-listener1] - RuntimeError: Logging Configuration Error! No SecretsMasker found! If you have custom logging, please make sure you configure it taking airflow configuration as a base as explained at https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/logging-tasks.html#advanced-configuration
FAILED task-sdk/tests/task_sdk/execution_time/test_supervisor.py::TestWatchedSubprocessKill::test_kill_escalation_path[SIGINT-escalates-to-SIGTERM-then-SIGKILL] - RuntimeError: Logging Configuration Error! No SecretsMasker found! If you have custom logging, please make sure you configure it taking airflow configuration as a base as explained at https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/logging-tasks.html#advanced-configuration
FAILED task-sdk/tests/task_sdk/execution_time/test_supervisor.py::TestWatchedSubprocessKill::test_kill_escalation_path[SIGTERM-escalates-to-SIGKILL] - RuntimeError: Logging Configuration Error! No SecretsMasker found! If you have custom logging, please make sure you configure it taking airflow configuration as a base as explained at https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/logging-tasks.html#advanced-configuration
FAILED task-sdk/tests/task_sdk/execution_time/test_supervisor.py::TestWatchedSubprocessKill::test_kill_escalation_path[SIGKILL-success-without-escalation] - RuntimeError: Logging Configuration Error! No SecretsMasker found! If you have custom logging, please make sure you configure it taking airflow configuration as a base as explained at https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/logging-tasks.html#advanced-configuration
FAILED task-sdk/tests/task_sdk/execution_time/test_supervisor.py::TestHandleRequest::test_handle_requests[get_variable] - RuntimeError: Logging Configuration Error! No SecretsMasker found! If you have custom logging, please make sure you configure it taking airflow configuration as a base as explained at https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/logging-tasks.html#advanced-configuration
==================================
Member
Author
Ah it should work, as its require in may tests, better to set fixture to autouse. |
Member
Yeah, I have unblocked myself by doing this: in #48896 |
potiuk
reviewed
Apr 8, 2025
potiuk
approved these changes
Apr 8, 2025
Member
|
I don;t think we need it after the change in https://github.com/astronomer/airflow/blob/2e2db3dc1838cfb27aa7a8a8c996c2661d8c75f7/task-sdk/tests/conftest.py#L129-L133 Closing it for now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

As mentioned @kaxil in slack its causing issue when we run. failing to load secrets_masker.
pytest task-sdk/tests/task_sdk/execution_time/test_supervisor.py::TestWatchedSubprocess::test_reading_from_pipes^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.