Skip to content

Point mask_secret deprecation warning at the module it actually uses - #70883

Open
bujjibabukatta wants to merge 1 commit into
apache:mainfrom
bujjibabukatta:fix/#70875
Open

Point mask_secret deprecation warning at the module it actually uses#70883
bujjibabukatta wants to merge 1 commit into
apache:mainfrom
bujjibabukatta:fix/#70875

Conversation

@bujjibabukatta

Copy link
Copy Markdown
Contributor

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 ?

  • Yes - Claude

Generated-by: Claude following the guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecation warning for airflow.sdk.execution_time.secrets_masker points at the wrong module for mask_secret

1 participant