Skip to content

Fix inconsistency between generated provider docs and pyproject.toml#68991

Merged
jason810496 merged 10 commits into
apache:mainfrom
Andrushika:fix-provider-cross-provider-extras-docs
Jun 28, 2026
Merged

Fix inconsistency between generated provider docs and pyproject.toml#68991
jason810496 merged 10 commits into
apache:mainfrom
Andrushika:fix-provider-cross-provider-extras-docs

Conversation

@Andrushika

@Andrushika Andrushika commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Continues the work started in #63906.

When breeze generates a provider's pyproject.toml, cross-provider dependencies that are already required dependencies (or belong to suspended providers) are filtered out before being emitted as optional extras. The generated README.md / index.rst was rendered from the raw cross-provider dependency graph instead, so the docs advertised pkg[extra] install commands for extras that don't exist in pyproject.toml. Users following the docs would hit an install error.

This PR routes the docs through the same filter via a new get_cross_provider_dependencies_for_extras() helper, so the extras listed in README.md / index.rst always match what pyproject.toml exposes. The generated section heading is also renamed from "Cross provider package dependencies" to "Optional cross-provider package dependencies" to reflect that the list is now strictly the optional extras users can install, not the full cross-provider graph.

I have regenerated the per-provider README.md / index.rst files in this PR — that's why the diff looks huge.

closes: #63891

Tests:

  • breeze run pytest dev/breeze/tests/test_packages.py::test_get_cross_provider_dependencies_for_extras
  • prek --files dev/breeze/src/airflow_breeze/utils/packages.py dev/breeze/tests/test_packages.py
Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Code Opus 4.8 following the guidelines, reviewed by @Andrushika.


  • 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.

@boring-cyborg

boring-cyborg Bot commented Jun 25, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@Andrushika

Copy link
Copy Markdown
Contributor Author

I updated all the docs by --reapply-templates-only as #63906 mentioned to pass the check.
But there is a check that failed:

When common.compat changes with other providers in the same PR, add '# use next version' comment where they depend on common-compat.
Example: "apache-airflow-providers-common-compat>=1.8.0",  # use next version

To bypass this check, add the label: 'skip common compat check'

I think this is because the docs in common-compat are updated, and it is okay to bypass the check.
I do not have permission to add the label. Please help. Thanks!

@guan404ming guan404ming added the skip common compat check Skips common compat provider modification check label Jun 26, 2026
@Andrushika Andrushika requested a review from dabla as a code owner June 26, 2026 13:58
@Andrushika Andrushika marked this pull request as draft June 26, 2026 14:30
@Andrushika Andrushika marked this pull request as ready for review June 26, 2026 15:57
@Andrushika Andrushika force-pushed the fix-provider-cross-provider-extras-docs branch from 1670edf to 875d3b2 Compare June 26, 2026 19:54
@Andrushika Andrushika changed the title Filter cross-provider extras in provider docs Fix inconsistency between generated provider docs and pyproject.toml Jun 26, 2026
@uranusjr uranusjr removed the backport-to-v3-3-test Backport to v3-3-test label Jun 26, 2026
Comment thread dev/breeze/src/airflow_breeze/utils/packages.py Outdated
@uranusjr

Copy link
Copy Markdown
Member

One minor point to fix, this looks good to me otherwise.

@jason810496 jason810496 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice! LGTM after addressing nit from TP, thanks.

@guan404ming guan404ming left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks nice, left one nit

Comment thread dev/breeze/src/airflow_breeze/utils/packages.py
@Andrushika

Copy link
Copy Markdown
Contributor Author

I have fixed the package name matching method, but some of the tests failed. I'm trying to track the issue, and I don't think these failures are related to this PR.

It appears to be due to the Airbyte provider compatibility test: they recently released a new version, which might be the main problem causing these failures. This PR only changes the Breeze/docs generation logic and regenerates provider docs, so I don’t think these Airbyte compatibility failures are related to this PR.

I’ll avoid expanding the discussion of this compatibility issue here. If the failure persists, I can open a separate issue to track it.

@jason810496 jason810496 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I’ll avoid expanding the discussion of this compatibility issue here. If the failure persists, I can open a separate issue to track it.

Please feel free to raise a PR to address it if you already got ideas in mind, no need to create an issue for it. #69075 encountered the same regression, and no one had raised PR yet. Thanks.

@shahar1

shahar1 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

I’ll avoid expanding the discussion of this compatibility issue here. If the failure persists, I can open a separate issue to track it.

Please feel free to raise a PR to address it if you already got ideas in mind, no need to create an issue for it. #69075 encountered the same regression, and no one had raised PR yet. Thanks.

I've already raised a PR here #69081 :)

@Andrushika

Copy link
Copy Markdown
Contributor Author

I've already raised a PR here #69081 :)

Thanks @shahar1, perfect timing! Will rebase once that lands.

Generated provider docs should only advertise extras that users can install explicitly. Required provider dependencies are already installed with the base provider package.
The generated section lists extras that users may install explicitly, so its heading should not imply it contains every cross-provider dependency.
The "Downloading official packages" section was inside the
`{% if CROSS_PROVIDERS_DEPENDENCIES %}` block, so providers whose
filtered cross-provider list is empty would silently lose their
download links. Move the section out of the conditional so it renders
for every provider regardless of optional extras.
Renaming the section to "Optional cross-provider package dependencies"
also introduced a hyphen that the surrounding docs and the original
heading did not use. Keep the established "cross provider" spelling so
the new "Optional" prefix is the only change visible to readers.
Reapply provider index and README templates so each provider's docs
match the filter that hides cross provider dependencies already
installed as required dependencies, and so they pick up the heading
rename and the relocated "Downloading official packages" section.
After syncing main into the branch, two providers (ibm.mq, informatica)
need their docs regenerated so they reflect both the cross provider
extras filter introduced in this PR and the dependency updates that
landed on main in the meantime.
The previous regen used the per-provider build-files prek hook, which
runs breeze with `--skip-readme`. Run the full template regen so
informatica's README.rst also reflects the common.compat dependency
that landed on main.
Earlier docs regenerations were run through a stale `breeze` install
that `uv` had cached from before the filter logic was simplified. As a
result, the previous regen reused the older filter that kept any
cross-provider entry also listed under `optional-dependencies`, and
informatica's docs still advertised `common.compat` as an optional
extra even though it is also a required dependency. Regenerate against
a fresh breeze build so the filter actually drops it.
@Andrushika Andrushika force-pushed the fix-provider-cross-provider-extras-docs branch from fe5781a to 839be0b Compare June 27, 2026 12:04
@Andrushika

Copy link
Copy Markdown
Contributor Author

All CI passed. Waiting for approval!

@jason810496 jason810496 merged commit 026aa84 into apache:main Jun 28, 2026
145 checks passed
@Andrushika Andrushika deleted the fix-provider-cross-provider-extras-docs branch June 28, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools skip common compat check Skips common compat provider modification check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Breeze mis-generates "cross provider dependency" docs

5 participants