Skip to content

Conversation

@amoghrajesh
Copy link
Contributor

After the merge of #54449, we nuked the airflow.sdk.execution_time.secrets_masker path, but it is possible that some provider etc would be using this since it is public API in their code which would break.

Adding a compat shim for that so that those code paths to continue working and providing them some time to migrate till the next release probably.

Before changes:

(airflow) ➜  airflow git:(compat-module-for-secrets-masker) ✗ git checkout main                                                               
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
(airflow) ➜  airflow git:(main) ✗ python           
Python 3.12.9 (main, Feb  4 2025, 14:38:38) [Clang 16.0.0 (clang-1600.0.26.6)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from airflow.sdk.execution_time.secrets_masker import Redactable, Redacted, SecretsMasker, should_hide_value_for_key
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'airflow.sdk.execution_time.secrets_masker'

After changes:

(airflow) ➜  airflow git:(compat-module-for-secrets-masker) ✗ python
Python 3.12.9 (main, Feb  4 2025, 14:38:38) [Clang 16.0.0 (clang-1600.0.26.6)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from airflow.sdk.execution_time.secrets_masker import Redactable, Redacted, SecretsMasker, should_hide_value_for_key
<stdin>:1 DeprecationWarning: Importing from 'airflow.sdk.execution_time.secrets_masker' is deprecated and will be removed in a future version. Please use 'airflow.sdk._shared.secrets_masker' instead.


^ 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.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@amoghrajesh amoghrajesh requested review from ashb and kaxil as code owners August 25, 2025 13:21
@amoghrajesh amoghrajesh self-assigned this Aug 25, 2025
@amoghrajesh amoghrajesh changed the title Compat module for secrets masker Adding a compat shim for secrets_masker that was moved to shared Aug 25, 2025
@amoghrajesh amoghrajesh merged commit 439c5c7 into apache:main Aug 25, 2025
144 of 146 checks passed
@amoghrajesh amoghrajesh deleted the compat-module-for-secrets-masker branch August 25, 2025 15:02
mangal-vairalkar pushed a commit to mangal-vairalkar/airflow that referenced this pull request Aug 30, 2025
nothingmin pushed a commit to nothingmin/airflow that referenced this pull request Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants