Skip to content

Resolve nested provider paths for conn-fields check from the real directory tree#70261

Open
Lee-W wants to merge 1 commit into
apache:mainfrom
astronomer:resolve-nested-provider-paths-from-the-real-directory-tree
Open

Resolve nested provider paths for conn-fields check from the real directory tree#70261
Lee-W wants to merge 1 commit into
apache:mainfrom
astronomer:resolve-nested-provider-paths-from-the-real-directory-tree

Conversation

@Lee-W

@Lee-W Lee-W commented Jul 23, 2026

Copy link
Copy Markdown
Member

Why

#70224 (comment)

The conn-fields prek hook guessed how many path segments made up a provider package name from a hardcoded list of known namespace prefixes, so it kept crashing on newly nested providers (e.g. IBM MQ) until someone manually patched the list.

What

Walking the actual directory tree to find each provider's provider.yaml makes it work for any current or future nested provider automatically.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: [Claude] following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@Lee-W
Lee-W force-pushed the resolve-nested-provider-paths-from-the-real-directory-tree branch from fdde0d6 to 8e476fa Compare July 23, 2026 07:03
@Lee-W Lee-W changed the title Resolve nested provider paths for conn-fields check from the real dir… Resolve nested provider paths for conn-fields check from the real directory tree Jul 23, 2026
@Lee-W
Lee-W marked this pull request as ready for review July 23, 2026 07:06
@Lee-W
Lee-W force-pushed the resolve-nested-provider-paths-from-the-real-directory-tree branch from 8e476fa to 54d0e6d Compare July 23, 2026 08:33
Comment thread scripts/ci/prek/check_provider_yaml_files.py
# under the License.
# /// script
# requires-python = ">=3.10,<3.11"
# requires-python = ">=3.10"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's probably a reason for this, we use it in all scripts, I cannot seem to recall it though

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... I blocked it every time I saw it🤔 things seem to work fine. Plus 3.10 EOL is nearby (oct 31st). Probably worth relax it? WDYT

@Lee-W
Lee-W force-pushed the resolve-nested-provider-paths-from-the-real-directory-tree branch from 54d0e6d to 6066ad7 Compare July 23, 2026 09:58
…ectory tree

The conn-fields prek hook guessed how many path segments made up a
provider package name from a hardcoded list of known namespace
prefixes, so it kept crashing on newly nested providers (e.g. IBM MQ)
until someone manually patched the list. Walking the actual directory
tree to find each provider's provider.yaml makes it work for any
current or future nested provider automatically.
@Lee-W
Lee-W force-pushed the resolve-nested-provider-paths-from-the-real-directory-tree branch from 6066ad7 to cee89cc Compare July 23, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants