Point mask_secret deprecation warning at the module it actually uses - #70883
Open
bujjibabukatta wants to merge 1 commit into
Open
Point mask_secret deprecation warning at the module it actually uses#70883bujjibabukatta wants to merge 1 commit into
bujjibabukatta wants to merge 1 commit into
Conversation
bujjibabukatta
requested review from
amoghrajesh,
ashb and
kaxil
as code owners
August 1, 2026 01:12
bujjibabukatta
force-pushed
the
fix/#70875
branch
from
August 1, 2026 09:48
791adbf to
97bd951
Compare
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.
Summary
Deprecation warning for airflow.sdk.execution_time.secrets_masker tells
everyone to switch to airflow.sdk._shared.secrets_masker — but for
mask_secret specifically that's wrong and silently weakens masking if
followed.
Root cause
getattr deliberately resolves mask_secret from airflow.sdk.log instead
of _shared, since airflow.sdk.log.mask_secret also notifies the supervisor
process while the _shared version doesn't. The warning text never carved
out this exception.
Fix
Updated the warning and docstring to name airflow.sdk.log for mask_secret.
getattr itself is unchanged. Added tests asserting object identity and
warning-message content.
closes: #70875
Was generative AI tooling used ?
Generated-by: Claude following the guidelines