You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by pi...@apache.org on 2023/03/07 22:00:22 UTC

[airflow] 01/02: Use python location in cache key used by Breeze (#29947)

This is an automated email from the ASF dual-hosted git repository.

pierrejeambrun pushed a commit to branch v2-5-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit fdee316d05739d92cbf2b9d01db6f69de46a0fa3
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Tue Mar 7 07:46:05 2023 +0100

    Use python location in cache key used by Breeze (#29947)
    
    Pipx installation is cached between runs and it should use
    python location in order to not reuse cache between different
    python versions, otherwise pipx installation might fail.
    
    (cherry picked from commit 913b7c113677fc9e444a95ef2071a0ab47312d27)
---
 .github/actions/breeze/action.yml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/.github/actions/breeze/action.yml b/.github/actions/breeze/action.yml
index 4db1164e2f..d926e14641 100644
--- a/.github/actions/breeze/action.yml
+++ b/.github/actions/breeze/action.yml
@@ -35,8 +35,10 @@ runs:
       uses: actions/cache@v3
       with:
         path: ~/.local/pipx
-        key: "breeze-${{ hashFiles('dev/breeze/README.md') }}"  # README has the latest breeze's hash
-        restore-keys: breeze-
+        # README has the latest breeze's hash and python location is used to distinguish between
+        # different minor versions of python
+        key: "breeze-${{ env.pythonLocation }}-${{ hashFiles('dev/breeze/README.md') }}"
+        restore-keys: breeze-${{ env.pythonLocation }}
     - name: "Install Breeze"
       shell: bash
       run: ./scripts/ci/install_breeze.sh