Skip to content

Add caching to GHA - #326

Merged
peterebden merged 2 commits into
masterfrom
peter/add-caching-to-gha
Sep 15, 2026
Merged

peterebden merged 2 commits into
masterfrom
peter/add-caching-to-gha

Conversation

@peterebden

Copy link
Copy Markdown
Member

I'm seeing a lot of random download failures in the tests. Thinking this is because we have a large fan-out of platforms / versions and they all re-download a bunch of Github artifacts, hitting rate limiting.

It seems like it might help if we cache those things. This is keyed on the Please version (for arcat) and the plugin and third-party versions, although it has a 'soft' restore key to avoid full rebuilds when we change something.

./pleasew -o "plugin.python.defaultinterpreter:$_external_interpreter" test --profile ci --keep_going --log_file plz-out/log/test-external_interpreter.log ${{ inputs.test_targets }}
echo "*** Running tests using in-repo Python interpreter: $_in_repo_interpreter"
./pleasew -o "plugin.python.defaultinterpreter:$_in_repo_interpreter" test --rerun --keep_going --log_file plz-out/log/test-in_repo_interpreter.log ${{ inputs.test_targets }}
./pleasew -o "plugin.python.defaultinterpreter:$_in_repo_interpreter" test --profile ci --keep_going --log_file plz-out/log/test-in_repo_interpreter.log ${{ inputs.test_targets }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If --rerun is removed here, is there a risk that the tests always pass on this invocation (because they passed on the previous one)? I think changing the value of CONFIG.PYTHON.DEFAULT_INTERPRETER ought to invalidate the cached results, but there must have been a reason I added --rerun here...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I wasn't sure what it was for - we shouldn't need that ideally. Changing the interpreter will be an input to the test so it would force it to rerun anyway

@peterebden
peterebden merged commit c41e06e into master Sep 15, 2026
236 of 237 checks passed
@peterebden
peterebden deleted the peter/add-caching-to-gha branch September 15, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants