Skip to content

Commit

Permalink
Make sure the key for k8s environment changes with requirements in CI (
Browse files Browse the repository at this point in the history
…apache#28317)

Previously, caching key for k8s environment was static - it did
not take into account that some of the file changes should
invalidate the cache. This PR changes it so that it changes
wheneve one of the contributing factors change:

* requirements
* airflow setup files
* airflow pyproject.toml
* generated provider dependencies

Changes in any of those should cause recreation of the venv.
  • Loading branch information
potiuk authored Dec 12, 2022
1 parent cfd8bd9 commit 37e754b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,9 @@ jobs:
uses: actions/cache@v3
with:
path: ".build/.k8s-env"
key: "k8s-env"
key: "\
k8s-env-${{ hashFiles('scripts/ci/kubernetes/k8s_requirements.txt','setup.cfg',\
'setup.py','pyproject.toml','generated/provider_dependencies.json') }}"
- name: Run complete K8S tests ${{needs.build-info.outputs.kubernetes-combos}}
run: breeze k8s run-complete-tests --run-in-parallel --upgrade
env:
Expand Down

0 comments on commit 37e754b

Please sign in to comment.