Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harden primer package caching against possible race condition #9931

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/primer_run_main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,16 @@ jobs:
${{ runner.os }}-${{ matrix.python-version }}-${{
steps.commitstring.outputs.commitstring }}-primer
- name: Regenerate cache
if: steps.cache-projects.outputs.cache-hit != 'true'
# Presence of colorama is a heuristic for the env having all packages
run: |
. venv/bin/activate
python tests/primer/__main__.py prepare --clone
if echo ${{ steps.cache-projects.outputs.cache-hit }} | grep -c "true" && python -m pip show colorama
then
echo "Cache hit: skipping primer clone command"
else
python tests/primer/__main__.py prepare --clone
fi
shell: bash
- name: Upload commit string
uses: actions/[email protected]
if: matrix.batchIdx == 0
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/primer_run_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,16 @@ jobs:
${{ runner.os }}-${{ matrix.python-version }}-${{
steps.commitstring.outputs.commitstring }}-primer
- name: Regenerate cache
if: steps.cache-projects.outputs.cache-hit != 'true'
# Presence of colorama is a heuristic for the env having all packages
run: |
. venv/bin/activate
python tests/primer/__main__.py prepare --clone
if echo ${{ steps.cache-projects.outputs.cache-hit }} | grep -c "true" && python -m pip show colorama
then
echo "Cache hit: skipping primer clone command"
else
python tests/primer/__main__.py prepare --clone
fi
shell: bash
- name: Check cache
run: |
. venv/bin/activate
Expand Down
Loading