Skip to content

Commit fb6702c

Browse files
committed
Merge remote-tracking branch 'origin/main' into bugfix/fix-index-urls-when-venv-is-created-with-uv
2 parents 024878a + d3a33da commit fb6702c

File tree

986 files changed

+10980
-5488
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

986 files changed

+10980
-5488
lines changed

.github/actions/breeze/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ description: 'Sets up Python and Breeze'
2121
inputs:
2222
python-version:
2323
description: 'Python version to use'
24-
default: "3.9"
24+
default: "3.10"
2525
use-uv:
2626
description: 'Whether to use uv tool'
2727
required: true
@@ -41,6 +41,8 @@ runs:
4141
- name: "Install Breeze"
4242
shell: bash
4343
run: ./scripts/ci/install_breeze.sh
44+
env:
45+
PYTHON_VERSION: "${{ inputs.python-version }}"
4446
- name: "Free space"
4547
shell: bash
4648
run: breeze ci free-space

.github/actions/install-pre-commit/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ description: 'Installs pre-commit and related packages'
2121
inputs:
2222
python-version:
2323
description: 'Python version to use'
24-
default: "3.9"
24+
default: "3.10"
2525
uv-version:
2626
description: 'uv version to use'
27-
default: "0.7.14" # Keep this comment to allow automatic replacement of uv version
27+
default: "0.7.16" # Keep this comment to allow automatic replacement of uv version
2828
pre-commit-version:
2929
description: 'pre-commit version to use'
3030
default: "4.2.0" # Keep this comment to allow automatic replacement of pre-commit version

.github/actions/prepare_all_ci_images/action.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,9 @@ runs:
3434
# TODO: Currently we cannot loop through the list of python versions and have dynamic list of
3535
# tasks. Instead we hardcode all possible python versions and they - but
3636
# this should be implemented in stash action as list of keys to download.
37-
# That includes 3.8 - 3.12 as we are backporting it to v2-10-test branch
37+
# That includes 3.9 - 3.12 as we are backporting it to v3-0-test branch
3838
# This is captured in https://github.com/apache/airflow/issues/45268
39-
- name: "Restore CI docker image ${{ inputs.platform }}:3.8"
40-
uses: ./.github/actions/prepare_single_ci_image
41-
with:
42-
platform: ${{ inputs.platform }}
43-
python: "3.8"
44-
python-versions-list-as-string: ${{ inputs.python-versions-list-as-string }}
39+
# So we actually need 3.9 even if 3.9 support on main is dropped!
4540
- name: "Restore CI docker image ${{ inputs.platform }}:3.9"
4641
uses: ./.github/actions/prepare_single_ci_image
4742
with:

.github/workflows/airflow-distributions-tests.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,16 @@ on: # yamllint disable-line rule:truthy
6161
description: "Whether local venv should be used for tests (true/false)"
6262
required: true
6363
type: string
64+
test-timeout:
65+
required: false
66+
type: number
67+
default: 60
68+
6469
permissions:
6570
contents: read
6671
jobs:
6772
distributions-tests:
68-
timeout-minutes: 80
73+
timeout-minutes: ${{ fromJSON(inputs.test-timeout) }}
6974
name: ${{ inputs.distribution-name }}:P${{ matrix.python-version }} tests
7075
runs-on: ${{ fromJSON(inputs.runners) }}
7176
strategy:

.github/workflows/basic-tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ jobs:
223223
VERBOSE: "false"
224224
SKIP_BREEZE_PRE_COMMITS: "true"
225225
SKIP: ${{ inputs.skip-pre-commits }}
226-
COLUMNS: "250"
226+
COLUMNS: "202"
227227

228228
test-git-clone-on-windows:
229229
timeout-minutes: 5
@@ -317,7 +317,6 @@ jobs:
317317
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
318318
GITHUB_USERNAME: ${{ github.actor }}
319319
VERBOSE: "true"
320-
if: inputs.canary-run == 'true'
321320
steps:
322321
- name: "Cleanup repo"
323322
shell: bash

.github/workflows/ci-amd.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ jobs:
186186
- name: Install pre-commit, uv, and pre-commit-uv
187187
shell: bash
188188
env:
189-
UV_VERSION: "0.7.14" # Keep this comment to allow automatic replacement of uv version
189+
UV_VERSION: "0.7.16" # Keep this comment to allow automatic replacement of uv version
190190
PRE_COMMIT_VERSION: "4.2.0" # Keep this comment to allow automatic replacement of pre-commit version
191191
PRE_COMMIT_UV_VERSION: "4.1.4" # Keep this comment to allow automatic replacement of pre-commit-uv version
192192
run: |
@@ -248,7 +248,6 @@ jobs:
248248
contents: read
249249
packages: write
250250
id-token: write
251-
if: needs.build-info.outputs.canary-run == 'true'
252251
with:
253252
runners: ${{ needs.build-info.outputs.amd-runners }}
254253
platform: "linux/amd64"
@@ -275,6 +274,8 @@ jobs:
275274
runners: ${{ needs.build-info.outputs.amd-runners }}
276275
platform: "linux/amd64"
277276
python-versions-list-as-string: ${{ needs.build-info.outputs.python-versions-list-as-string }}
277+
python-versions: ${{ needs.build-info.outputs.python-versions }}
278+
generate-pypi-constraints: "true"
278279
# generate no providers constraints only in canary builds - they take quite some time to generate
279280
# they are not needed for regular builds, they are only needed to update constraints in canaries
280281
generate-no-providers-constraints: ${{ needs.build-info.outputs.canary-run }}
@@ -784,6 +785,7 @@ jobs:
784785
distribution-cmd-format: "prepare-task-sdk-distributions"
785786
test-type: "task-sdk-tests"
786787
use-local-venv: 'false'
788+
test-timeout: 20
787789
if: >
788790
( needs.build-info.outputs.run-task-sdk-tests == 'true' ||
789791
needs.build-info.outputs.run-tests == 'true' &&
@@ -819,12 +821,19 @@ jobs:
819821
go-version: 1.24
820822
cache-dependency-path: go-sdk/go.sum
821823

824+
# keep this in sync with go.mod in go-sdk/
825+
- name: Setup Gotestsum
826+
shell: bash
827+
run: |
828+
go install gotest.tools/gotestsum@ddd0b05a6878e2e8257a2abe6e7df66cebc53d0e # v1.12.3
829+
gotestsum --version
830+
822831
- name: "Cleanup dist files"
823832
run: rm -fv ./dist/*
824833

825834
- name: Run Go tests
826835
working-directory: ./go-sdk
827-
run: go test -v ./...
836+
run: gotestsum --format testname ./...
828837

829838
tests-airflow-ctl:
830839
name: "Airflow CTL tests"
@@ -844,6 +853,7 @@ jobs:
844853
distribution-cmd-format: "prepare-airflow-ctl-distributions"
845854
test-type: "airflow-ctl-tests"
846855
use-local-venv: 'true'
856+
test-timeout: 20
847857
if: >
848858
( needs.build-info.outputs.run-airflow-ctl-tests == 'true' ||
849859
needs.build-info.outputs.run-tests == 'true' &&

.github/workflows/ci-arm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ jobs:
210210
contents: read
211211
packages: write
212212
id-token: write
213-
if: needs.build-info.outputs.canary-run == 'true'
214213
with:
215214
runners: ${{ needs.build-info.outputs.arm-runners }}
216215
platform: "linux/arm64"
@@ -237,13 +236,14 @@ jobs:
237236
runners: ${{ needs.build-info.outputs.arm-runners }}
238237
platform: "linux/arm64"
239238
python-versions-list-as-string: ${{ needs.build-info.outputs.python-versions-list-as-string }}
239+
python-versions: ${{ needs.build-info.outputs.python-versions }}
240+
generate-pypi-constraints: "true"
240241
# generate no providers constraints only in canary builds - they take quite some time to generate
241242
# they are not needed for regular builds, they are only needed to update constraints in canaries
242243
generate-no-providers-constraints: ${{ needs.build-info.outputs.canary-run }}
243244
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
244245
use-uv: ${{ needs.build-info.outputs.use-uv }}
245246

246-
247247
providers:
248248
name: "provider distributions tests"
249249
uses: ./.github/workflows/test-providers.yml

.github/workflows/ci-image-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ jobs:
193193
env:
194194
VERBOSE: "false"
195195
SKIP: ${{ inputs.skip-pre-commits }}
196-
COLUMNS: "250"
196+
COLUMNS: "202"
197197
SKIP_GROUP_OUTPUT: "true"
198198
DEFAULT_BRANCH: ${{ inputs.branch }}
199199
RUFF_FORMAT: "github"
@@ -235,7 +235,7 @@ jobs:
235235
run: pre-commit run --color always --verbose --hook-stage manual "$MYPY_CHECK" --all-files
236236
env:
237237
VERBOSE: "false"
238-
COLUMNS: "250"
238+
COLUMNS: "202"
239239
SKIP_GROUP_OUTPUT: "true"
240240
DEFAULT_BRANCH: ${{ inputs.branch }}
241241
RUFF_FORMAT: "github"

.github/workflows/finalize-tests.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
- name: "Download constraints from the constraints generated by build CI image"
119119
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
120120
with:
121-
name: constraints
121+
pattern: constraints-*
122122
path: ./files
123123
- name: "Diff in constraints for Python: ${{ inputs.python-versions-list-as-string }}"
124124
run: ./scripts/ci/constraints/ci_diff_constraints.sh
@@ -132,6 +132,34 @@ jobs:
132132
run:
133133
git push
134134

135+
dependency-upgrade-summary:
136+
runs-on: ${{ fromJSON(inputs.runners) }}
137+
needs: [update-constraints]
138+
if: inputs.upgrade-to-newer-dependencies == 'true' && inputs.platform == 'linux/amd64'
139+
name: "Dependency upgrade summary"
140+
env:
141+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142+
steps:
143+
- name: "Cleanup repo"
144+
shell: bash
145+
run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
146+
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
147+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
148+
with:
149+
persist-credentials: false
150+
- name: "Prepare breeze & CI image: ${{ matrix.python-version }}"
151+
uses: ./.github/actions/prepare_breeze_and_image
152+
with:
153+
platform: ${{ inputs.platform }}
154+
python: ${{ inputs.default-python-version }}
155+
use-uv: ${{ inputs.use-uv }}
156+
- name: "Dependency upgrade summary"
157+
shell: bash
158+
run: >
159+
breeze run uv run /opt/airflow/dev/constraints-updated-version-check.py --explain-why
160+
env:
161+
PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
162+
135163
push-buildx-cache-to-github-registry:
136164
name: Push Regular Image Cache ${{ inputs.platform }}
137165
needs: [update-constraints]

.github/workflows/generate-constraints.yml

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,18 @@ on: # yamllint disable-line rule:truthy
3232
description: "Stringified array of all Python versions to test - separated by spaces."
3333
required: true
3434
type: string
35+
python-versions:
36+
description: "JSON-formatted array of Python versions to generate constraints for"
37+
required: true
38+
type: string
3539
generate-no-providers-constraints:
3640
description: "Whether to generate constraints without providers (true/false)"
3741
required: true
3842
type: string
43+
generate-pypi-constraints:
44+
description: "Whether to generate PyPI constraints (true/false)"
45+
required: true
46+
type: string
3947
debug-resources:
4048
description: "Whether to run in debug mode (true/false)"
4149
required: true
@@ -45,19 +53,22 @@ on: # yamllint disable-line rule:truthy
4553
required: true
4654
type: string
4755
jobs:
48-
generate-constraints:
56+
generate-constraints-matrix:
4957
permissions:
5058
contents: read
5159
timeout-minutes: 70
52-
name: Generate constraints ${{ inputs.python-versions-list-as-string }}
60+
name: Generate constraints for ${{ matrix.python-version }} on ${{ inputs.platform }}
5361
runs-on: ${{ fromJSON(inputs.runners) }}
62+
strategy:
63+
matrix:
64+
python-version: ${{ fromJson(inputs.python-versions) }}
5465
env:
5566
DEBUG_RESOURCES: ${{ inputs.debug-resources }}
5667
GITHUB_REPOSITORY: ${{ github.repository }}
5768
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5869
GITHUB_USERNAME: ${{ github.actor }}
5970
INCLUDE_SUCCESS_OUTPUTS: "true"
60-
PYTHON_VERSIONS: ${{ inputs.python-versions-list-as-string }}
71+
PYTHON_VERSION: ${{ matrix.python-version }}
6172
VERBOSE: "true"
6273
steps:
6374
- name: "Cleanup repo"
@@ -67,72 +78,61 @@ jobs:
6778
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6879
with:
6980
persist-credentials: false
70-
- name: "Prepare and cleanup runner"
71-
run: ./scripts/ci/prepare_and_cleanup_runner.sh
72-
shell: bash
73-
- name: "Install Breeze"
74-
uses: ./.github/actions/breeze
75-
with:
76-
use-uv: ${{ inputs.use-uv }}
77-
id: breeze
78-
- name: "Prepare all CI images: ${{ inputs.python-versions-list-as-string}}"
79-
uses: ./.github/actions/prepare_all_ci_images
81+
- name: "Prepare breeze & CI image: ${{ matrix.python-version }}"
82+
uses: ./.github/actions/prepare_breeze_and_image
8083
with:
8184
platform: ${{ inputs.platform }}
82-
python-versions-list-as-string: ${{ inputs.python-versions-list-as-string }}
83-
docker-volume-location: "" # TODO(jscheffl): Understand why it fails here and fix it
84-
- name: "Verify all CI images ${{ inputs.python-versions-list-as-string }}"
85-
run: breeze ci-image verify --run-in-parallel
85+
python: ${{ matrix.python-version }}
86+
use-uv: ${{ inputs.use-uv }}
8687
- name: "Source constraints"
8788
shell: bash
8889
run: >
89-
breeze release-management generate-constraints --run-in-parallel
90+
breeze release-management generate-constraints
9091
--airflow-constraints-mode constraints-source-providers --answer yes
92+
--python "${PYTHON_VERSION}"
9193
- name: "No providers constraints"
9294
shell: bash
9395
timeout-minutes: 25
9496
run: >
95-
breeze release-management generate-constraints --run-in-parallel
96-
--airflow-constraints-mode constraints-no-providers --answer yes --parallelism 3
97-
# The no providers constraints are only needed when we want to update constraints (in canary builds)
98-
# They slow down the start of PROD image builds so we want to only run them when needed.
97+
breeze release-management generate-constraints
98+
--airflow-constraints-mode constraints-no-providers --answer yes
99+
--python "${PYTHON_VERSION}"
99100
if: inputs.generate-no-providers-constraints == 'true'
100101
- name: "Prepare updated provider distributions"
101-
# In case of provider distributions which are not yet released, we build them from sources
102102
shell: bash
103103
run: >
104-
breeze release-management prepare-provider-distributions --include-not-ready-providers
105-
--distribution-format wheel
104+
breeze release-management prepare-provider-distributions
105+
--include-not-ready-providers --distribution-format wheel
106+
if: inputs.generate-pypi-constraints == 'true'
106107
- name: "Prepare airflow distributions"
107108
shell: bash
108109
run: >
109110
breeze release-management prepare-airflow-distributions --distribution-format wheel
111+
if: inputs.generate-pypi-constraints == 'true'
110112
- name: "Prepare task-sdk distribution"
111113
shell: bash
112114
run: >
113115
breeze release-management prepare-task-sdk-distributions --distribution-format wheel
116+
if: inputs.generate-pypi-constraints == 'true'
114117
- name: "PyPI constraints"
115118
shell: bash
116119
timeout-minutes: 25
117120
run: |
118-
for PYTHON in $PYTHON_VERSIONS; do
119-
breeze release-management generate-constraints --airflow-constraints-mode constraints \
120-
--answer yes --python "${PYTHON}"
121-
done
122-
- name: "Dependency upgrade summary"
123-
shell: bash
124-
env:
125-
PYTHON_VERSIONS: ${{ env.PYTHON_VERSIONS }}
126-
run: |
127-
for PYTHON_VERSION in $PYTHON_VERSIONS; do
128-
echo "Summarizing Python $PYTHON_VERSION"
129-
cat "files/constraints-${PYTHON_VERSION}"/*.md >> $GITHUB_STEP_SUMMARY || true
130-
df -H
131-
done
121+
breeze release-management generate-constraints --airflow-constraints-mode constraints \
122+
--answer yes --python "${PYTHON_VERSION}"
123+
if: inputs.generate-pypi-constraints == 'true'
132124
- name: "Upload constraint artifacts"
133125
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
134126
with:
135-
name: constraints
136-
path: ./files/constraints-*/constraints-*.txt
127+
name: constraints-${{ matrix.python-version }}
128+
path: ./files/constraints-${{ matrix.python-version }}/constraints-*.txt
137129
retention-days: 7
138130
if-no-files-found: error
131+
- name: "Dependency upgrade summary"
132+
shell: bash
133+
env:
134+
PYTHON_VERSION: ${{ matrix.python-version }}
135+
run: |
136+
echo "Summarizing Python $PYTHON_VERSION"
137+
cat "files/constraints-${PYTHON_VERSION}"/*.md >> $GITHUB_STEP_SUMMARY || true
138+
df -H

0 commit comments

Comments
 (0)