Fix inconsistency between generated provider docs and pyproject.toml#68991
Conversation
|
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
|
bcf063a to
7b4ec7c
Compare
|
I updated all the docs by I think this is because the docs in common-compat are updated, and it is okay to bypass the check. |
1670edf to
875d3b2
Compare
|
One minor point to fix, this looks good to me otherwise. |
jason810496
left a comment
There was a problem hiding this comment.
Nice! LGTM after addressing nit from TP, thanks.
|
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. |
There was a problem hiding this comment.
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 :) |
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.
fe5781a to
839be0b
Compare
|
All CI passed. Waiting for approval! |
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 generatedREADME.md/index.rstwas rendered from the raw cross-provider dependency graph instead, so the docs advertisedpkg[extra]install commands for extras that don't exist inpyproject.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 inREADME.md/index.rstalways match whatpyproject.tomlexposes. 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.rstfiles 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_extrasprek --files dev/breeze/src/airflow_breeze/utils/packages.py dev/breeze/tests/test_packages.pyWas generative AI tooling used to co-author this PR?
Generated-by: Claude Code Opus 4.8 following the guidelines, reviewed by @Andrushika.
{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.