Skip to content

Commit dfc9b50

Browse files
Harden primer package caching against possible race condition
Refs #9925 (comment)
1 parent 67acc96 commit dfc9b50

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/primer_run_main.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ jobs:
7878
${{ runner.os }}-${{ matrix.python-version }}-${{
7979
steps.commitstring.outputs.commitstring }}-primer
8080
- name: Regenerate cache
81-
if: steps.cache-projects.outputs.cache-hit != 'true'
81+
# Presence of colorama is a heuristic for the env having all packages
82+
if: steps.cache-projects.outputs.cache-hit != 'true' || ! pip show colorama
8283
run: |
8384
. venv/bin/activate
8485
python tests/primer/__main__.py prepare --clone

.github/workflows/primer_run_pr.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ jobs:
147147
${{ runner.os }}-${{ matrix.python-version }}-${{
148148
steps.commitstring.outputs.commitstring }}-primer
149149
- name: Regenerate cache
150-
if: steps.cache-projects.outputs.cache-hit != 'true'
150+
# Presence of colorama is a heuristic for the env having all packages
151+
if: steps.cache-projects.outputs.cache-hit != 'true' || ! pip show colorama
151152
run: |
152153
. venv/bin/activate
153154
python tests/primer/__main__.py prepare --clone

0 commit comments

Comments
 (0)