Skip to content

Commit 3198aad

Browse files
authored
Run parallel tests for ARM platform (#50198)
Since we have `ubintu22.04-arm` public runners available, we should be able to run a set of parallel tests for ARM - this would make our ARM images move out of experimental phase. We are not running "all" tests - only those that make sense to run on ARM for "production" quality. MySQL tests have some timeouts and run longer on ARM, that's why we do not run MySQL tests on ARM as well. We can also get rid of the "ARM collection" test that was introduced to test if just **collection** of tests when we remove packages that shoud not be installed on ARM works. But if we are running actual pytest tests on ARM, we do not need to run those tests any more.
1 parent 31c7c96 commit 3198aad

31 files changed

+923
-500
lines changed

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

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ name: Additional CI image checks
2020
on: # yamllint disable-line rule:truthy
2121
workflow_call:
2222
inputs:
23-
amd-runners:
24-
description: "The array of labels (in json form) determining AMD public runners."
23+
runners:
24+
description: "The array of labels (in json form) determining runners."
2525
required: true
2626
type: string
27-
arm-runners:
28-
description: "The array of labels (in json form) determining ARM public runners."
27+
platform:
28+
description: "Platform for the build - 'linux/amd64' or 'linux/arm64'"
2929
required: true
3030
type: string
3131
python-versions:
@@ -99,12 +99,11 @@ jobs:
9999
# from forks. This is to prevent malicious PRs from creating images in the "apache/airflow" repo.
100100
packages: write
101101
with:
102-
amd-runners: ${{ inputs.amd-runners }}
103-
arm-runners: ${{ inputs.arm-runners }}
102+
runners: ${{ inputs.runners }}
104103
cache-type: "Early"
105104
include-prod-images: "false"
106105
push-latest-images: "false"
107-
platform: "linux/amd64"
106+
platform: ${{ inputs.platform }}
108107
python-versions: ${{ inputs.python-versions }}
109108
branch: ${{ inputs.branch }}
110109
constraints-branch: ${{ inputs.constraints-branch }}
@@ -120,7 +119,7 @@ jobs:
120119
check-that-image-builds-quickly:
121120
timeout-minutes: 11
122121
name: Check that image builds quickly
123-
runs-on: ${{ fromJSON(inputs.amd-runners) }}
122+
runs-on: ${{ fromJSON(inputs.runners) }}
124123
env:
125124
UPGRADE_TO_NEWER_DEPENDENCIES: false
126125
PYTHON_MAJOR_MINOR_VERSION: ${{ inputs.default-python-version }}
@@ -129,6 +128,7 @@ jobs:
129128
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130129
GITHUB_USERNAME: ${{ github.actor }}
131130
VERBOSE: "true"
131+
PLATFORM: ${{ inputs.platform }}
132132
if: inputs.branch == 'main'
133133
steps:
134134
- name: "Cleanup repo"
@@ -150,29 +150,4 @@ jobs:
150150
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
151151
run: echo "$GITHUB_TOKEN" | docker login ghcr.io -u "$actor" --password-stdin
152152
- name: "Check that image builds quickly"
153-
run: breeze shell --max-time 600 --platform "linux/amd64"
154-
155-
# This is only a check if ARM images are successfully building when committer runs PR from
156-
# Apache repository. This is needed in case you want to fix failing cache job in "canary" run
157-
# There is no point in running this one in "canary" run, because the above step is doing the
158-
# same build anyway.
159-
# build-ci-arm-images:
160-
# name: Build CI ARM images
161-
# uses: ./.github/workflows/ci-image-build.yml
162-
# permissions:
163-
# contents: read
164-
# packages: write
165-
# with:
166-
# amd-runners: ${{ inputs.amd-runners }}
167-
# arm-runners: ${{ inputs.arm-runners }}
168-
# platform: "linux/arm64"
169-
# push-image: "false"
170-
# upload-image-artifact: "true"
171-
# upload-mount-cache-artifact: ${{ inputs.canary-run }}
172-
# python-versions: ${{ inputs.python-versions }}
173-
# branch: ${{ inputs.branch }}
174-
# constraints-branch: ${{ inputs.constraints-branch }}
175-
# use-uv: ${{ inputs.use-uv }}
176-
# upgrade-to-newer-dependencies: ${{ inputs.upgrade-to-newer-dependencies }}
177-
# docker-cache: ${{ inputs.docker-cache }}
178-
# disable-airflow-repo-cache: ${{ inputs.disable-airflow-repo-cache }}
153+
run: breeze shell --max-time 600 --platform "${PLATFORM}"

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

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ name: Additional PROD image tests
2020
on: # yamllint disable-line rule:truthy
2121
workflow_call:
2222
inputs:
23-
amd-runners:
24-
description: "The array of labels (in json form) determining AMD public runners."
23+
runners:
24+
description: "The array of labels (in json form) determining runners."
25+
required: true
26+
type: string
27+
platform:
28+
description: "Platform for the build - 'linux/amd64' or 'linux/arm64'"
2529
required: true
2630
type: string
2731
default-branch:
@@ -63,7 +67,8 @@ jobs:
6367
name: PROD image extra checks (main)
6468
uses: ./.github/workflows/prod-image-extra-checks.yml
6569
with:
66-
amd-runners: ${{ inputs.amd-runners }}
70+
runners: ${{ inputs.runners }}
71+
platform: ${{ inputs.platform }}
6772
python-versions: "[ '${{ inputs.default-python-version }}' ]"
6873
default-python-version: ${{ inputs.default-python-version }}
6974
branch: ${{ inputs.default-branch }}
@@ -78,7 +83,8 @@ jobs:
7883
name: PROD image extra checks (release)
7984
uses: ./.github/workflows/prod-image-extra-checks.yml
8085
with:
81-
amd-runners: ${{ inputs.amd-runners }}
86+
runners: ${{ inputs.runners }}
87+
platform: ${{ inputs.platform }}
8288
python-versions: "[ '${{ inputs.default-python-version }}' ]"
8389
default-python-version: ${{ inputs.default-python-version }}
8490
branch: ${{ inputs.default-branch }}
@@ -92,7 +98,7 @@ jobs:
9298
test-examples-of-prod-image-building:
9399
timeout-minutes: 60
94100
name: "Test examples of PROD image building"
95-
runs-on: ${{ fromJSON(inputs.amd-runners) }}
101+
runs-on: ${{ fromJSON(inputs.runners) }}
96102
env:
97103
GITHUB_REPOSITORY: ${{ github.repository }}
98104
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -112,7 +118,7 @@ jobs:
112118
- name: "Prepare breeze & PROD image: ${{ inputs.default-python-version }}"
113119
uses: ./.github/actions/prepare_breeze_and_image
114120
with:
115-
platform: "linux/amd64"
121+
platform: ${{ inputs.platform }}
116122
image-type: "prod"
117123
python: ${{ inputs.default-python-version }}
118124
use-uv: ${{ inputs.use-uv }}
@@ -130,7 +136,7 @@ jobs:
130136
test-docker-compose-quick-start:
131137
timeout-minutes: 60
132138
name: "Docker Compose quick start with PROD image verifying"
133-
runs-on: ${{ fromJSON(inputs.amd-runners) }}
139+
runs-on: ${{ fromJSON(inputs.runners) }}
134140
env:
135141
PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
136142
GITHUB_REPOSITORY: ${{ github.repository }}
@@ -149,7 +155,7 @@ jobs:
149155
- name: "Prepare breeze & PROD image: ${{ env.PYTHON_MAJOR_MINOR_VERSION }}"
150156
uses: ./.github/actions/prepare_breeze_and_image
151157
with:
152-
platform: "linux/amd64"
158+
platform: ${{ inputs.platform }}
153159
image-type: "prod"
154160
python: ${{ env.PYTHON_MAJOR_MINOR_VERSION }}
155161
use-uv: ${{ inputs.use-uv }}

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ on: # yamllint disable-line rule:truthy
2121
workflow_call:
2222
inputs:
2323
# Static inputs defined to choose which distribution to test to run
24-
amd-runners:
25-
description: "The array of labels (in json form) determining public AMD runners."
24+
runners:
25+
description: "The array of labels (in json form) determining runners."
26+
required: true
27+
type: string
28+
platform:
29+
description: "Platform for the build - 'linux/amd64' or 'linux/arm64'"
2630
required: true
2731
type: string
2832
distribution-name:
@@ -59,7 +63,7 @@ jobs:
5963
distributions-tests:
6064
timeout-minutes: 80
6165
name: ${{ inputs.distribution-name }}:P${{ matrix.python-version }} tests
62-
runs-on: ${{ fromJSON(inputs.amd-runners) }}
66+
runs-on: ${{ fromJSON(inputs.runners) }}
6367
strategy:
6468
fail-fast: false
6569
matrix:
@@ -82,7 +86,7 @@ jobs:
8286
- name: "Prepare breeze & CI image: ${{ matrix.python-version }}"
8387
uses: ./.github/actions/prepare_breeze_and_image
8488
with:
85-
platform: "linux/amd64"
89+
platform: ${{ inputs.platform }}
8690
python: ${{ matrix.python-version }}
8791
use-uv: ${{ inputs.use-uv }}
8892
- name: "Cleanup dist files"

.github/workflows/basic-tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ name: Basic tests
2020
on: # yamllint disable-line rule:truthy
2121
workflow_call:
2222
inputs:
23-
amd-runners:
24-
description: "The array of labels (in json form) determining public runners."
23+
runners:
24+
description: "The array of labels (in json form) determining runners."
2525
required: true
2626
type: string
2727
run-ui-tests:
@@ -66,7 +66,7 @@ jobs:
6666
run-breeze-tests:
6767
timeout-minutes: 10
6868
name: Breeze unit tests
69-
runs-on: ${{ fromJSON(inputs.amd-runners) }}
69+
runs-on: ${{ fromJSON(inputs.runners) }}
7070
steps:
7171
- name: "Cleanup repo"
7272
shell: bash
@@ -87,7 +87,7 @@ jobs:
8787
tests-ui:
8888
timeout-minutes: 15
8989
name: React UI tests
90-
runs-on: ${{ fromJSON(inputs.amd-runners) }}
90+
runs-on: ${{ fromJSON(inputs.runners) }}
9191
if: inputs.run-ui-tests == 'true'
9292
steps:
9393
- name: "Cleanup repo"
@@ -155,7 +155,7 @@ jobs:
155155
install-pre-commit:
156156
timeout-minutes: 5
157157
name: "Install pre-commit for cache"
158-
runs-on: ${{ fromJSON(inputs.amd-runners) }}
158+
runs-on: ${{ fromJSON(inputs.runners) }}
159159
env:
160160
PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
161161
steps:
@@ -183,7 +183,7 @@ jobs:
183183
static-checks-basic-checks-only:
184184
timeout-minutes: 30
185185
name: "Static checks: basic checks only"
186-
runs-on: ${{ fromJSON(inputs.amd-runners) }}
186+
runs-on: ${{ fromJSON(inputs.runners) }}
187187
needs: install-pre-commit
188188
if: inputs.basic-checks-only == 'true'
189189
steps:
@@ -236,7 +236,7 @@ jobs:
236236
upgrade-check:
237237
timeout-minutes: 45
238238
name: "Upgrade checks"
239-
runs-on: ${{ fromJSON(inputs.amd-runners) }}
239+
runs-on: ${{ fromJSON(inputs.runners) }}
240240
needs: install-pre-commit
241241
env:
242242
PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
@@ -306,7 +306,7 @@ jobs:
306306
test-airflow-release-commands:
307307
timeout-minutes: 80
308308
name: "Test Airflow release commands"
309-
runs-on: ${{ fromJSON(inputs.amd-runners) }}
309+
runs-on: ${{ fromJSON(inputs.runners) }}
310310
env:
311311
PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
312312
GITHUB_REPOSITORY: ${{ github.repository }}

0 commit comments

Comments
 (0)