This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-0-test by this push:
new bc012592de1 [v3-0-test] Make cache for prek dependent on platform
(#54655) (#54729)
bc012592de1 is described below
commit bc012592de197479d2579433e3e4d28aa86e4152
Author: Jarek Potiuk <[email protected]>
AuthorDate: Wed Aug 20 14:28:03 2025 +0200
[v3-0-test] Make cache for prek dependent on platform (#54655) (#54729)
(cherry picked from commit ef911fa273072f963e3267df559cddd92b50965e)
---
.github/actions/install-prek/action.yml | 6 +++++-
.github/workflows/basic-tests.yml | 7 +++++++
.github/workflows/ci-amd.yml | 1 +
.github/workflows/ci-arm.yml | 1 +
.github/workflows/ci-image-checks.yml | 5 ++++-
5 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/.github/actions/install-prek/action.yml
b/.github/actions/install-prek/action.yml
index 2841ed1608f..7f9627805a6 100644
--- a/.github/actions/install-prek/action.yml
+++ b/.github/actions/install-prek/action.yml
@@ -31,6 +31,9 @@ inputs:
skip-prek-hooks:
description: "Skip some prek hooks from installation"
default: ""
+ platform:
+ description: 'Platform for the build - linux/amd64 or linux/arm64'
+ required: true
runs:
using: "composite"
steps:
@@ -57,7 +60,8 @@ runs:
- name: "Restore prek cache"
uses:
apache/infrastructure-actions/stash/restore@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
- key: cache-prek-v5-${{ inputs.python-version }}-${{
hashFiles('.pre-commit-config.yaml') }}
+ # yamllint disable rule:line-length
+ key: cache-prek-v6-${{ inputs.platform }}-${{ inputs.python-version
}}-${{ hashFiles('.pre-commit-config.yaml') }}
path: /tmp/
id: restore-prek-cache
- name: "Check if prek cache tarball exists"
diff --git a/.github/workflows/basic-tests.yml
b/.github/workflows/basic-tests.yml
index d289793ac00..99559f2cfb4 100644
--- a/.github/workflows/basic-tests.yml
+++ b/.github/workflows/basic-tests.yml
@@ -60,6 +60,10 @@ on: # yamllint disable-line rule:truthy
description: "Whether to use uv in the image"
required: true
type: string
+ platform:
+ description: 'Platform for the build - linux/amd64 or linux/arm64'
+ required: true
+ type: string
permissions:
contents: read
jobs:
@@ -174,6 +178,7 @@ jobs:
with:
python-version: ${{steps.breeze.outputs.host-python-version}}
skip-prek-hooks: ${{ inputs.skip-prek-hooks }}
+ platform: ${{ inputs.platform }}
# Those checks are run if no image needs to be built for checks. This is for
simple changes that
# Do not touch any of the python code or any of the important files that
might require building
@@ -203,6 +208,7 @@ jobs:
with:
python-version: ${{ steps.breeze.outputs.host-python-version }}
skip-prek-hooks: ${{ inputs.skip-prek-hooks }}
+ platform: ${{ inputs.platform }}
- name: Fetch incoming commit ${{ github.sha }} with its parent
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #
v4.2.2
with:
@@ -257,6 +263,7 @@ jobs:
with:
python-version: ${{steps.breeze.outputs.host-python-version}}
skip-prek-hooks: ${{ inputs.skip-prek-hooks }}
+ platform: ${{ inputs.platform }}
# TODO(potiuk): enable this once prek supports automatic upgrade of hooks
# after https://github.com/j178/prek/issues/35 is
implemented§
# - name: "Autoupdate all prek hooks"
diff --git a/.github/workflows/ci-amd.yml b/.github/workflows/ci-amd.yml
index 68d7e4c5c3d..309c8f26dc1 100644
--- a/.github/workflows/ci-amd.yml
+++ b/.github/workflows/ci-amd.yml
@@ -212,6 +212,7 @@ jobs:
canary-run: ${{needs.build-info.outputs.canary-run}}
latest-versions-only: ${{needs.build-info.outputs.latest-versions-only}}
use-uv: ${{needs.build-info.outputs.use-uv}}
+ platform: "linux/amd64"
build-ci-images:
name: Build CI images
diff --git a/.github/workflows/ci-arm.yml b/.github/workflows/ci-arm.yml
index f7fbc9ae312..bc140d82238 100644
--- a/.github/workflows/ci-arm.yml
+++ b/.github/workflows/ci-arm.yml
@@ -175,6 +175,7 @@ jobs:
canary-run: ${{needs.build-info.outputs.canary-run}}
latest-versions-only: ${{needs.build-info.outputs.latest-versions-only}}
use-uv: ${{needs.build-info.outputs.use-uv}}
+ platform: "linux/arm64"
build-ci-images:
name: Build CI images
diff --git a/.github/workflows/ci-image-checks.yml
b/.github/workflows/ci-image-checks.yml
index cd0c627ae11..e209aca95a6 100644
--- a/.github/workflows/ci-image-checks.yml
+++ b/.github/workflows/ci-image-checks.yml
@@ -148,6 +148,7 @@ jobs:
id: prek
with:
python-version: ${{steps.breeze.outputs.host-python-version}}
+ platform: ${{ inputs.platform }}
if: inputs.canary-run == 'true'
- name: "Prepare .tar file from prek cache"
run: |
@@ -158,7 +159,7 @@ jobs:
uses:
apache/infrastructure-actions/stash/save@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
# yamllint disable rule:line-length
- key: cache-prek-v5-${{ steps.breeze.outputs.host-python-version
}}-${{ hashFiles('.pre-commit-config.yaml') }}
+ key: cache-prek-v6-${{ inputs.platform }}-${{
steps.breeze.outputs.host-python-version }}-${{
hashFiles('.pre-commit-config.yaml') }}
path: /tmp/cache-prek.tar.gz
if-no-files-found: 'error'
retention-days: '2'
@@ -194,6 +195,7 @@ jobs:
id: prek
with:
python-version: ${{steps.breeze.outputs.host-python-version}}
+ platform: ${{ inputs.platform }}
- name: "Static checks"
run: prek --all-files --show-diff-on-failure --color always
env:
@@ -237,6 +239,7 @@ jobs:
id: prek
with:
python-version: ${{steps.breeze.outputs.host-python-version}}
+ platform: ${{ inputs.platform }}
- name: "MyPy checks for ${{ matrix.mypy-check }}"
run: prek --color always --verbose --hook-stage manual "$MYPY_CHECK"
--all-files
env: