Skip to content

Commit 90f7c39

Browse files
authored
Synchronize GitHub workflows and Breeze tooling for 2.11 branch (#61598)
This commit synchronizes CI/CD infrastructure and development tooling from the main branch to the 2.11 release branch, including: GitHub Actions workflows: - Pin GitHub actions to specific commit SHAs for security (actions/checkout@v4.3.1) - Remove unnecessary 'secrets: inherit' declarations from workflow calls - Add 'id-token: write' permission for prod image builds - Update generate-constraints workflow with PyPI constraints support - Remove unneeded 'recheck-old-bug-report' workflow Breeze development tool updates: - Upgrade Python minimum version from 3.9 to 3.10 - Update dependencies: black (>=25.0.0), packaging (>=25.0), pytest (>=8.3.3) - Add 'prek' and 'restructuredtext-lint' dependencies - Pin rich-click <1.9.0 to avoid breaking changes - Unpin flit and flit-core versions for flexibility - Update flit build-system requirement to >=3.11 Docker and CI infrastructure: - Update Dockerfile base images and entrypoint scripts - Refresh pre-commit hook configurations - Update Breeze documentation and generated CLI output images Code improvements: - Add selective check for migration SQL files - Update path utilities and test fixtures - Refresh uv.lock with updated dependency resolution The main point behind upgrading Python version to 3.10 is that Python 3.9 is officially end-of-life and many of the dependencies had already stopped releasing even security fixes for 3.9. Since the upcoming 2.11.1 version is mainly a security-focused release, we decided to drop support for Python 3.9 in order to be able to upgrade all related dependencies to latest security patch versions. There are absolutely minimal changes in behaviour between Python 3.9 and 3.10 and we have not experienced virtually any problems because of this - other than dependency issues, so it should be very minimal overhead for anyone to upgrade to Python 3.10 even if they used Python 3.9.
1 parent 6925162 commit 90f7c39

File tree

146 files changed

+2096
-1801
lines changed

Some content is hidden

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

146 files changed

+2096
-1801
lines changed

.github/actions/breeze/action.yml

Lines changed: 4 additions & 2 deletions
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
@@ -33,14 +33,16 @@ runs:
3333
using: "composite"
3434
steps:
3535
- name: "Setup python"
36-
uses: actions/setup-python@v5
36+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3737
with:
3838
python-version: ${{ inputs.python-version }}
3939
# NOTE! Installing Breeze without using cache is FASTER than when using cache - uv is so fast and has
4040
# so low overhead, that just running upload cache/restore cache is slower than installing it from scratch
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.16" # Keep this comment to allow automatic replacement of uv version
27+
default: "0.9.11" # Keep this comment to allow automatic replacement of uv version
2828
pre-commit-version:
2929
description: 'pre-commit version to use'
3030
default: "3.5.0" # Keep this comment to allow automatic replacement of pre-commit version

.github/actions/post_tests_failure/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ runs:
2222
using: "composite"
2323
steps:
2424
- name: "Upload airflow logs"
25-
uses: actions/upload-artifact@v4
25+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
2626
with:
2727
name: airflow-logs-${{env.JOB_ID}}
2828
path: './files/airflow_logs*'
2929
retention-days: 7
3030
if-no-files-found: ignore
3131
- name: "Upload container logs"
32-
uses: actions/upload-artifact@v4
32+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
3333
with:
3434
name: container-logs-${{env.JOB_ID}}
3535
path: "./files/container_logs*"
3636
retention-days: 7
3737
if-no-files-found: ignore
3838
- name: "Upload other logs"
39-
uses: actions/upload-artifact@v4
39+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
4040
with:
4141
name: container-logs-${{env.JOB_ID}}
4242
path: "./files/other_logs*"

.github/actions/post_tests_success/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ runs:
3131
using: "composite"
3232
steps:
3333
- name: "Upload artifact for warnings"
34-
uses: actions/upload-artifact@v4
34+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
3535
with:
3636
name: test-warnings-${{ env.JOB_ID }}
3737
path: ./files/warnings-*.txt
@@ -44,7 +44,7 @@ runs:
4444
mkdir ./files/coverage-reports
4545
mv ./files/coverage*.xml ./files/coverage-reports/ || true
4646
- name: "Upload all coverage reports to codecov"
47-
uses: codecov/codecov-action@v4
47+
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
4848
env:
4949
CODECOV_TOKEN: ${{ inputs.codecov-token }}
5050
if: env.ENABLE_COVERAGE == 'true' && env.TEST_TYPES != 'Helm' && inputs.python-version != '3.12'

.github/actions/prepare_all_ci_images/action.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ runs:
3636
# this should be implemented in stash action as list of keys to download.
3737
# That includes 3.9 - 3.12 as we are backporting it to v2-11-test branch
3838
# This is captured in https://github.com/apache/airflow/issues/45268
39-
- name: "Restore CI docker image ${{ inputs.platform }}:3.9"
40-
uses: ./.github/actions/prepare_single_ci_image
41-
with:
42-
platform: ${{ inputs.platform }}
43-
python: "3.9"
44-
python-versions-list-as-string: ${{ inputs.python-versions-list-as-string }}
4539
- name: "Restore CI docker image ${{ inputs.platform }}:3.10"
4640
uses: ./.github/actions/prepare_single_ci_image
4741
with:

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ jobs:
102102
# This write is only given here for `push` events from "apache/airflow" repo. It is not given for PRs
103103
# from forks. This is to prevent malicious PRs from creating images in the "apache/airflow" repo.
104104
packages: write
105-
secrets: inherit
106105
with:
107106
runs-on-as-json-public: ${{ inputs.runs-on-as-json-public }}
108107
runs-on-as-json-self-hosted: ${{ inputs.runs-on-as-json-self-hosted }}
@@ -138,7 +137,7 @@ jobs:
138137
shell: bash
139138
run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
140139
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
141-
uses: actions/checkout@v4
140+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
142141
with:
143142
persist-credentials: false
144143
- name: "Cleanup docker"
@@ -165,7 +164,6 @@ jobs:
165164
# permissions:
166165
# contents: read
167166
# packages: write
168-
# secrets: inherit
169167
# with:
170168
# platform: "linux/arm64"
171169
# push-image: "false"

.github/workflows/additional-prod-image-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
shell: bash
112112
run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
113113
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
114-
uses: actions/checkout@v4
114+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
115115
with:
116116
fetch-depth: 2
117117
persist-credentials: false
@@ -151,7 +151,7 @@ jobs:
151151
shell: bash
152152
run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
153153
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
154-
uses: actions/checkout@v4
154+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
155155
with:
156156
fetch-depth: 2
157157
persist-credentials: false

.github/workflows/automatic-backport.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
- name: Find PR information
3939
id: pr-info
40-
uses: actions/github-script@v7
40+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
4141
env:
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4343
with:

.github/workflows/backport-cli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
steps:
5454
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
5555
id: checkout-for-backport
56-
uses: actions/checkout@v4
56+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
5757
with:
5858
persist-credentials: true
5959
fetch-depth: 0

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
shell: bash
127127
run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
128128
- name: "Checkout target branch"
129-
uses: actions/checkout@v4
129+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
130130
with:
131131
persist-credentials: false
132132
- name: "Cleanup docker"

0 commit comments

Comments
 (0)