Repository navigation
Conversation
The deprecation shim at airflow.sdk.execution_time.secrets_masker tells users to move to airflow.sdk._shared.secrets_masker, but its own __getattr__ resolves mask_secret from airflow.sdk.log instead — and the two are not equivalent: the log version also notifies the supervisor, while the _shared version only masks locally. Anyone following the warning silently loses supervisor-side masking. This corrects the guidance to match what the shim already does; __getattr__ itself is unchanged.
Contributor
Author
|
@ashb The PR is ready to be reviewed. |
This branch has not been deployed
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.
Fixes the misleading deprecation warning in the
airflow.sdk.execution_time.secrets_maskercompatibility shim.The shim warns users to move to
airflow.sdk._shared.secrets_masker, but its own__getattr__resolvesmask_secretfromairflow.sdk.log— and the two are not equivalent:airflow.sdk.log.mask_secretalso notifies the supervisor process, while the_sharedversion only masks locally. Following the warning silently drops supervisor-side masking. This corrects the warning text and the module docstring to nameairflow.sdk.logformask_secret(and_sharedfor 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
DeprecatedImportWarningcategory and a full-messagematch, following thepytest.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?
Generated-by: GPT Astra following the guidelines.
I used GPT Astra only for inline code completion.