Add file locking to dir cache - #3573
Merged
Merged
Conversation
toastwaffle
approved these changes
Aug 20, 2026
Co-authored-by: Samuel Littley <samuel.littley@toastwaffle.com>
peterebden
added a commit
that referenced
this pull request
Aug 23, 2026
Stacked on #3573 Now the cache is threadsafe, we can share it between e2e tests. It's not super obvious but these have slowed down a _lot_ over time - as they moved to `plz_repo_e2e_test` which is better separated but rebuilds more, plugins added more downloads and (most significantly) we now build the Go stdlib in tree rather than assuming it's on the system. This isn't so bad on a powerful machine but it is bad on a weaker one (i.e. all the CI machines). I've also rationalised some of the plugin / Go versions in there. There is possibly some future work to keep all these better aligned with the parent repo - honestly we usually just forget (hence 10 version old plugins and Go 1.24). I've added the cache to CircleCI as well; otherwise it will always be cold, and we can't deduplicate the work between everything in that case, so we'd get no benefit without.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should make it safer to run concurrent processes without them corrupting the shared cache.
I'm going to have a look at sharing it between the e2e tests, which are very slow on weaker machines (like CI) because they heavily rebuild the Go stdlib. That's nontrivial though so I will leave for a separate PR.