Skip to content

Use mask_secret from common.compat 1.22.0 in mcp hook - #75064

Merged
Lee-W merged 1 commit into
apache:mainfrom
mattwang44:refactor-mcp-hook-mask-secret-compat
Oct 21, 2026
Merged

Lee-W merged 1 commit into
apache:mainfrom
mattwang44:refactor-mcp-hook-mask-secret-compat

Conversation

@mattwang44

Copy link
Copy Markdown
Contributor

Refactoring only, no behavior change.

MCPHook carried its own three-level try/except to import mask_secret across Airflow versions. common.compat 1.22.0 exports the same helper with the same fallback order (#70766), so the hook now imports it from there like the rest of the provider.

This PR raises common.compat floor to 1.22.0, the first release with mask_secret (so this needs the allow provider dependency bump label.)


Was generative AI tooling used to co-author this PR?

@Lee-W

Lee-W commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

@hussein-awala FYI, since you'll be handling the next provider release wave. I'm adding the allow provider dependency bump label to this one. Thanks!

@mattwang44

mattwang44 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

rebasing it since the CI still failed due to not detecting the label (CI run), the code has not changed.

@Lee-W

Lee-W commented Oct 19, 2026

Copy link
Copy Markdown
Member

let me try to add it again

@Lee-W
Lee-W force-pushed the refactor-mcp-hook-mask-secret-compat branch from 990b385 to 09a7876 Compare October 19, 2026 08:31
@mattwang44
mattwang44 force-pushed the refactor-mcp-hook-mask-secret-compat branch from 09a7876 to 946bd05 Compare October 21, 2026 05:55
@mattwang44

Copy link
Copy Markdown
Contributor Author

another CI check seems to be flaky, rebased

@mattwang44
mattwang44 force-pushed the refactor-mcp-hook-mask-secret-compat branch from 946bd05 to b4acc90 Compare October 21, 2026 07:11
MCPHook carried its own three-level try/except to locate mask_secret
across Airflow 2.11, 3.0 and 3.1+. common.compat 1.22.0 exports the same
helper with the same fallback order, so the hook now imports it from
airflow.providers.common.compat.sdk like the rest of the provider does.

The common.compat floor moves to 1.22.0, the first release that exports
mask_secret; with 1.21.x installed the import would fail.
@mattwang44
mattwang44 force-pushed the refactor-mcp-hook-mask-secret-compat branch from b4acc90 to 0a87af9 Compare October 21, 2026 08:48
@Lee-W
Lee-W merged commit 6ebc8d5 into apache:main Oct 21, 2026
86 checks passed
@mattwang44
mattwang44 deleted the refactor-mcp-hook-mask-secret-compat branch October 21, 2026 10:24
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.

2 participants