Skip to content

Resolve release constraints against PyPI providers only - #71140

Merged
potiuk merged 1 commit into
mainfrom
pypi-only-constraints-for-release
Aug 5, 2026
Merged

Resolve release constraints against PyPI providers only#71140
potiuk merged 1 commit into
mainfrom
pypi-only-constraints-for-release

Conversation

@potiuk

@potiuk potiuk commented Aug 5, 2026

Copy link
Copy Markdown
Member

release-constraints.yml produces the constraints a release ships, which pin every provider at the version published on PyPI. It was still building the providers from the sources in the checkout first.

That is wrong in two ways. The built wheels land in the dist directory that the PyPI resolution reads through --find-links, so a locally built wheel can answer for a provider — and get_locally_build_distribution_specs() then excludes anything answered locally from the constraints file. The provider the release most needed pinned is the one that ends up missing. It is the right behaviour while developing a provider that is not on PyPI yet; it is the opposite of what a release wants.

It also makes cutting constraints depend on the provider build toolchain working. That is what broke the 3.3.1rc1 run: flit removed --no-setup-py, prepare-provider-distributions failed on all five Python versions, and generation died before any resolution ran.

A new pypi-providers-only input on generate-constraints.yml (default false, so nothing else changes) skips both the source-providers constraints and the provider distribution build. release-constraints.yml sets it. Combined with the generate-no-providers-constraints: "false" already there, a release run now generates only the PyPI constraints.

The airflow and task-sdk distributions are still built — a release resolves apache-airflow==<version> before that version exists on PyPI, so those have to come from --find-links.

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Opus 5 (1M context)

Generated-by: Claude Opus 5 (1M context) following the guidelines

A release pins the providers as published on PyPI. Building them from the sources
first puts a locally built wheel where the resolution can find it, and anything
answered locally is then left out of the constraints - dropping the very pin the
release needed. It also makes the release depend on the provider build toolchain
working, which is what broke 3.3.1rc1: flit removed --no-setup-py and package
preparation failed before any resolution ran.
@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.3.1 milestone Aug 5, 2026
@vatsrahul1001 vatsrahul1001 added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Aug 5, 2026
@potiuk
potiuk merged commit c37ba12 into main Aug 5, 2026
7 checks passed
@potiuk
potiuk deleted the pypi-only-constraints-for-release branch August 5, 2026 04:05
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-3-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test Commit Link

You can attempt to backport this manually by running:

cherry_picker c37ba12 v3-3-test

This should apply the commit to the v3-3-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

potiuk added a commit that referenced this pull request Aug 5, 2026
)

A release pins the providers as published on PyPI. Building them from the sources
first puts a locally built wheel where the resolution can find it, and anything
answered locally is then left out of the constraints - dropping the very pin the
release needed. It also makes the release depend on the provider build toolchain
working, which is what broke 3.3.1rc1: flit removed --no-setup-py and package
preparation failed before any resolution ran.

(cherry picked from commit c37ba12)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
vatsrahul1001 added a commit that referenced this pull request Aug 5, 2026
)

A release pins the providers as published on PyPI. Building them from the sources
first puts a locally built wheel where the resolution can find it, and anything
answered locally is then left out of the constraints - dropping the very pin the
release needed. It also makes the release depend on the provider build toolchain
working, which is what broke 3.3.1rc1: flit removed --no-setup-py and package
preparation failed before any resolution ran.

(cherry picked from commit c37ba12)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools backport-to-v3-3-test Backport to v3-3-test changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants