allow filtering repo-content cache#166
Open
titusfortner wants to merge 1 commit into
Open
Conversation
f506950 to
f44df36
Compare
Contributor
Author
|
Verified current code is working. Reduced repository-cache from 3.7GB to 1.9GB, You can see the last 2 jobs on this run: https://github.com/SeleniumHQ/selenium/actions/runs/26453263318/job/77898879869#step:57:3 and |
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.
What
New boolean input
repo-contents-cache, the extracted-repo directory Bazel 8+ stores at${repository_cache}/contentsis excluded from the saved GitHub cache via a!${repository_cache}/contentspath pattern. No effect unlessrepository-cacheis enabled.Why
The repo contents cache (extracted repos + repo-rule results) sits inside the repository cache directory, so today it's silently included in the saved cache on Bazel 8+. Excluding contents keeps the download cache (the dominant time saver, since it avoids re-downloading) while dropping the saved size to ~2.3 GB. Opting in trades size for skipping re-extraction/repo-rule evaluation.
For Selenium's primary build cache-contents is 4.2GB of the 6.5GB total. When the GitHub limit is 10GB this is the difference between being able to use caching on our primary build and needing to disable it.
Default valiue
Defaulted to
trueto stay backward-compatible — current behavior already persists contents on Bazel 8+. Given the size data above, a strong case exists for changing the default tofalse; happy to flip if preferred.Notes
contents/dir, so the exclusion is a no-op.repositoryCache.paths, so restore and save compute the same@actions/cacheversion. Toggling the input changes that version and invalidates existing repository caches (repopulated on next run).--repo_contents_cache=moves everything over to external cache, so it doesn't save space.