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 68cdae69d4e Switch to latest "stash" action from
apache/infrastructure-actions (#45653)
68cdae69d4e is described below
commit 68cdae69d4ebed5659776f03c8ead2b9d052d1ee
Author: Jarek Potiuk <[email protected]>
AuthorDate: Tue Jan 14 20:24:31 2025 +0100
Switch to latest "stash" action from apache/infrastructure-actions (#45653)
There are a few improvements just merged in the latest version
of the "stash" suite of actions that we contributed.
Most of the changes were result of making the #45289 works with
stash action and since the changes were added we found that we
need to do things differently (for example rather than storing
.cache directly we need to tar the directories because we need
to preserve permissions and symbolic links). There is however
one useful feature that remained - namely protecting against
accidentally downloading stash from the main branch, when the
PR needs only "its own" artifact (helpful in case of typos in the
workflow where wrong image artifact name is specified).
This PR switches to latest version of the action and enables the
protection in "prepare images" composite actions.
---
.github/actions/install-pre-commit/action.yml | 2 +-
.github/actions/prepare_breeze_and_image/action.yml | 3 ++-
.github/actions/prepare_single_ci_image/action.yml | 3 ++-
.github/workflows/basic-tests.yml | 8 ++++----
.github/workflows/ci-image-build.yml | 6 +++---
.github/workflows/ci-image-checks.yml | 6 +++---
.github/workflows/prod-image-build.yml | 2 +-
7 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/.github/actions/install-pre-commit/action.yml
b/.github/actions/install-pre-commit/action.yml
index 92147d9ee02..8ac0440ceae 100644
--- a/.github/actions/install-pre-commit/action.yml
+++ b/.github/actions/install-pre-commit/action.yml
@@ -56,7 +56,7 @@ runs:
echo
shell: bash
- name: "Restore pre-commit cache"
- uses:
apache/infrastructure-actions/stash/restore@c94b890bbedc2fc61466d28e6bd9966bc6c6643c
+ uses:
apache/infrastructure-actions/stash/restore@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
key: cache-pre-commit-v4-${{ inputs.python-version }}-${{
hashFiles('.pre-commit-config.yaml') }}
path: /tmp/
diff --git a/.github/actions/prepare_breeze_and_image/action.yml
b/.github/actions/prepare_breeze_and_image/action.yml
index 26be0b76315..e5f7bc3dd64 100644
--- a/.github/actions/prepare_breeze_and_image/action.yml
+++ b/.github/actions/prepare_breeze_and_image/action.yml
@@ -53,10 +53,11 @@ runs:
run: sudo chown -R ${USER} /mnt
shell: bash
- name: "Restore ${{ inputs.image-type }} docker image ${{ inputs.platform
}}:${{ inputs.python }}"
- uses:
apache/infrastructure-actions/stash/restore@c94b890bbedc2fc61466d28e6bd9966bc6c6643c
+ uses:
apache/infrastructure-actions/stash/restore@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
key: ${{ inputs.image-type }}-image-save-${{ inputs.platform }}-${{
inputs.python }}
path: "/mnt/"
+ only-current-branch: 'true'
- name: "Load ${{ inputs.image-type }} image ${{ inputs.platform }}:${{
inputs.python }}"
env:
PLATFORM: ${{ inputs.platform }}
diff --git a/.github/actions/prepare_single_ci_image/action.yml
b/.github/actions/prepare_single_ci_image/action.yml
index ecae9f802c9..d8041c15937 100644
--- a/.github/actions/prepare_single_ci_image/action.yml
+++ b/.github/actions/prepare_single_ci_image/action.yml
@@ -42,10 +42,11 @@ runs:
run: sudo chown -R ${USER} /mnt
shell: bash
- name: "Restore CI docker images ${{ inputs.platform }}:${{ inputs.python
}}"
- uses:
apache/infrastructure-actions/stash/restore@c94b890bbedc2fc61466d28e6bd9966bc6c6643c
+ uses:
apache/infrastructure-actions/stash/restore@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
key: ci-image-save-${{ inputs.platform }}-${{ inputs.python }}
path: "/mnt/"
+ only-current-branch: 'true'
if: contains(inputs.python-versions-list-as-string, inputs.python)
- name: "Load CI image ${{ inputs.platform }}:${{ inputs.python }}"
env:
diff --git a/.github/workflows/basic-tests.yml
b/.github/workflows/basic-tests.yml
index 5cb71cb7f5c..764eb6f714a 100644
--- a/.github/workflows/basic-tests.yml
+++ b/.github/workflows/basic-tests.yml
@@ -111,7 +111,7 @@ jobs:
cache: 'pnpm'
cache-dependency-path: 'airflow/ui/pnpm-lock.yaml'
- name: "Restore eslint cache (ui)"
- uses:
apache/infrastructure-actions/stash/restore@c94b890bbedc2fc61466d28e6bd9966bc6c6643c
+ uses:
apache/infrastructure-actions/stash/restore@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
path: airflow/ui/node_modules/
key: cache-ui-node-modules-v1-${{ runner.os }}-${{
hashFiles('airflow/ui/**/pnpm-lock.yaml') }}
@@ -121,7 +121,7 @@ jobs:
env:
FORCE_COLOR: 2
- name: "Save eslint cache (ui)"
- uses:
apache/infrastructure-actions/stash/save@c94b890bbedc2fc61466d28e6bd9966bc6c6643c
+ uses:
apache/infrastructure-actions/stash/save@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
path: airflow/ui/node_modules/
key: cache-ui-node-modules-v1-${{ runner.os }}-${{
hashFiles('airflow/ui/**/pnpm-lock.yaml') }}
@@ -149,7 +149,7 @@ jobs:
with:
node-version: 21
- name: "Restore eslint cache (www)"
- uses:
apache/infrastructure-actions/stash/restore@c94b890bbedc2fc61466d28e6bd9966bc6c6643c
+ uses:
apache/infrastructure-actions/stash/restore@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
path: airflow/www/node_modules/
key: cache-www-node-modules-v1-${{ runner.os }}-${{
hashFiles('airflow/www/**/yarn.lock') }}
@@ -159,7 +159,7 @@ jobs:
env:
FORCE_COLOR: 2
- name: "Save eslint cache (www)"
- uses:
apache/infrastructure-actions/stash/save@c94b890bbedc2fc61466d28e6bd9966bc6c6643c
+ uses:
apache/infrastructure-actions/stash/save@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
path: airflow/www/node_modules/
key: cache-www-node-modules-v1-${{ runner.os }}-${{
hashFiles('airflow/www/**/yarn.lock') }}
diff --git a/.github/workflows/ci-image-build.yml
b/.github/workflows/ci-image-build.yml
index 9283dc06b93..d819dffb327 100644
--- a/.github/workflows/ci-image-build.yml
+++ b/.github/workflows/ci-image-build.yml
@@ -136,7 +136,7 @@ jobs:
with:
use-uv: ${{ inputs.use-uv }}
- name: "Restore ci-cache mount image ${{ inputs.platform }}:${{
env.PYTHON_MAJOR_MINOR_VERSION }}"
- uses:
apache/infrastructure-actions/stash/restore@c94b890bbedc2fc61466d28e6bd9966bc6c6643c
+ uses:
apache/infrastructure-actions/stash/restore@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
key: "ci-cache-mount-save-v2-${{ inputs.platform }}-${{
env.PYTHON_MAJOR_MINOR_VERSION }}"
path: "/tmp/"
@@ -187,7 +187,7 @@ jobs:
run: breeze ci-image save --platform "${PLATFORM}" --image-file-dir
"/mnt"
if: inputs.upload-image-artifact == 'true'
- name: "Stash CI docker image ${{ env.PYTHON_MAJOR_MINOR_VERSION }}"
- uses:
apache/infrastructure-actions/stash/save@c94b890bbedc2fc61466d28e6bd9966bc6c6643c
+ uses:
apache/infrastructure-actions/stash/save@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
key: ci-image-save-${{ inputs.platform }}-${{
env.PYTHON_MAJOR_MINOR_VERSION }}
path: "/mnt/ci-image-save-*-${{ env.PYTHON_MAJOR_MINOR_VERSION
}}.tar"
@@ -202,7 +202,7 @@ jobs:
--cache-file
/tmp/ci-cache-mount-save-v2-${PYTHON_MAJOR_MINOR_VERSION}.tar.gz
if: inputs.upload-mount-cache-artifact == 'true'
- name: "Stash cache mount ${{ inputs.platform }}:${{
env.PYTHON_MAJOR_MINOR_VERSION }}"
- uses:
apache/infrastructure-actions/stash/save@c94b890bbedc2fc61466d28e6bd9966bc6c6643c
+ uses:
apache/infrastructure-actions/stash/save@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
key: "ci-cache-mount-save-v2-${{ inputs.platform }}-${{
env.PYTHON_MAJOR_MINOR_VERSION }}"
path: "/tmp/ci-cache-mount-save-v2-${{
env.PYTHON_MAJOR_MINOR_VERSION }}.tar.gz"
diff --git a/.github/workflows/ci-image-checks.yml
b/.github/workflows/ci-image-checks.yml
index c6784042cec..0448ed40a6f 100644
--- a/.github/workflows/ci-image-checks.yml
+++ b/.github/workflows/ci-image-checks.yml
@@ -146,7 +146,7 @@ jobs:
shell: bash
if: inputs.canary-run == 'true'
- name: "Save pre-commit cache"
- uses:
apache/infrastructure-actions/stash/save@c94b890bbedc2fc61466d28e6bd9966bc6c6643c
+ uses:
apache/infrastructure-actions/stash/save@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
# yamllint disable rule:line-length
key: cache-pre-commit-v4-${{
steps.breeze.outputs.host-python-version }}-${{
hashFiles('.pre-commit-config.yaml') }}
@@ -271,7 +271,7 @@ jobs:
python: ${{ inputs.default-python-version }}
use-uv: ${{ inputs.use-uv }}
- name: "Restore docs inventory cache"
- uses:
apache/infrastructure-actions/stash/restore@c94b890bbedc2fc61466d28e6bd9966bc6c6643c
+ uses:
apache/infrastructure-actions/stash/restore@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
path: ./docs/_inventory_cache/
# TODO(potiuk): do better with determining the key
@@ -283,7 +283,7 @@ jobs:
run: >
breeze build-docs ${DOCS_LIST_AS_STRING} ${{ matrix.flag }}
- name: "Save docs inventory cache"
- uses:
apache/infrastructure-actions/stash/save@c94b890bbedc2fc61466d28e6bd9966bc6c6643c
+ uses:
apache/infrastructure-actions/stash/save@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
path: ./docs/_inventory_cache/
key: cache-docs-inventory-v1-${{ hashFiles('pyproject.toml') }}
diff --git a/.github/workflows/prod-image-build.yml
b/.github/workflows/prod-image-build.yml
index 5784c7c58ba..0b8951d663a 100644
--- a/.github/workflows/prod-image-build.yml
+++ b/.github/workflows/prod-image-build.yml
@@ -296,7 +296,7 @@ jobs:
breeze prod-image save --platform "${PLATFORM}" --image-file-dir
"/mnt"
if: inputs.upload-image-artifact == 'true'
- name: "Stash PROD docker image ${{ env.PYTHON_MAJOR_MINOR_VERSION }}"
- uses:
apache/infrastructure-actions/stash/save@c94b890bbedc2fc61466d28e6bd9966bc6c6643c
+ uses:
apache/infrastructure-actions/stash/save@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
with:
key: prod-image-save-${{ inputs.platform }}-${{
env.PYTHON_MAJOR_MINOR_VERSION }}
path: "/mnt/prod-image-save-*-${{ env.PYTHON_MAJOR_MINOR_VERSION
}}.tar"