This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new c37ba12f1c1 Resolve release constraints against PyPI providers only
(#71140)
c37ba12f1c1 is described below
commit c37ba12f1c153578b6db1f65d602b204a2376b79
Author: Jarek Potiuk <[email protected]>
AuthorDate: Wed Aug 5 06:05:49 2026 +0200
Resolve release constraints against PyPI providers only (#71140)
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.
---
.github/workflows/generate-constraints.yml | 18 +++++++++++++++++-
.github/workflows/release-constraints.yml | 4 ++++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/generate-constraints.yml
b/.github/workflows/generate-constraints.yml
index 8178cde09e0..026ad45401a 100644
--- a/.github/workflows/generate-constraints.yml
+++ b/.github/workflows/generate-constraints.yml
@@ -53,6 +53,15 @@ on: # yamllint disable-line rule:truthy
required: false
default: "false"
type: string
+ pypi-providers-only:
+ description: >
+ Resolve against providers exactly as published on PyPI (true/false).
Skips building the
+ provider distributions from sources and the source-providers
constraints with them, so
+ nothing local can answer for a provider. Set when the constraints
being produced are the
+ ones a release ships - see the comments on the steps this disables.
+ required: false
+ default: "false"
+ type: string
debug-resources:
description: "Whether to run in debug mode (true/false)"
required: true
@@ -113,12 +122,15 @@ jobs:
python: ${{ matrix.python-version }}
use-uv: ${{ inputs.use-uv }}
make-mnt-writeable-and-cleanup: true
+ # Resolves the providers from the sources in this checkout. Skipped for
a release, which
+ # ships only the PyPI constraints and must not have a source tree answer
for a provider.
- name: "Source constraints"
shell: bash
run: >
breeze release-management generate-constraints
--airflow-constraints-mode constraints-source-providers --answer yes
--python "${PYTHON_VERSION}"
+ if: inputs.pypi-providers-only != 'true'
- name: "No providers constraints"
shell: bash
timeout-minutes: 25
@@ -127,12 +139,16 @@ jobs:
--airflow-constraints-mode constraints-no-providers --answer yes
--python "${PYTHON_VERSION}"
if: inputs.generate-no-providers-constraints == 'true'
+ # Builds the providers from sources into the dist directory the PyPI
resolution reads through
+ # `--find-links`, so a locally built wheel can answer for a provider and
is then excluded from
+ # the constraints. That is wanted while developing a provider that is
not on PyPI yet; it is the
+ # opposite of what a release wants, which is every provider pinned at
its published version.
- name: "Prepare updated provider distributions"
shell: bash
run: >
breeze release-management prepare-provider-distributions
--include-not-ready-providers --distribution-format wheel
- if: inputs.generate-pypi-constraints == 'true'
+ if: inputs.generate-pypi-constraints == 'true' &&
inputs.pypi-providers-only != 'true'
- name: "Prepare airflow distributions"
shell: bash
run: >
diff --git a/.github/workflows/release-constraints.yml
b/.github/workflows/release-constraints.yml
index 268abf83341..afa9d0690d4 100644
--- a/.github/workflows/release-constraints.yml
+++ b/.github/workflows/release-constraints.yml
@@ -179,6 +179,10 @@ jobs:
# Only the PyPI constraints are what a release ships; the other modes
serve CI, and
# regenerating them here would move them for reasons unrelated to the
release.
generate-no-providers-constraints: "false"
+ # A release pins the providers as published on PyPI, so nothing is built
from the sources
+ # here: a locally built provider wheel would answer the resolution and
then be left out of
+ # the constraints, which is exactly the version the release needed
pinned.
+ pypi-providers-only: "true"
allow-pre-releases: ${{ needs.build-info.outputs.allow-pre-releases }}
debug-resources: "false"
checkout-ref: ${{ inputs.ref }}