PCTEJA opened a new pull request, #77524: URL: https://github.com/apache/airflow/pull/77524
Fixes the misleading deprecation warning in the `airflow.sdk.execution_time.secrets_masker` compatibility shim. The shim warns users to move to `airflow.sdk._shared.secrets_masker`, but its own `__getattr__` resolves `mask_secret` from `airflow.sdk.log` — and the two are not equivalent: `airflow.sdk.log.mask_secret` also notifies the supervisor process, while the `_shared` version only masks locally. Following the warning silently drops supervisor-side masking. This corrects the warning text and the module docstring to name `airflow.sdk.log` for `mask_secret` (and `_shared` for everything else), matching what the shim already does. `__getattr__` is unchanged. This revives #70883 by @bujjibabukatta, which was approved by a maintainer and the reporter but auto-closed as stale before it could be merged. The change here is identical to that PR except the new test now asserts the warning with an explicit `DeprecatedImportWarning` category and a full-message `match`, following the `pytest.warns(...)` convention used across the task-sdk tests. The test fails against the old warning text and passes with the fix. closes: #70875 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Muse Spark Generated-by: Muse Spark following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
