Skip to content

ci: Improve bazel caching#133

Draft
lurtz wants to merge 19 commits into
mainfrom
improved-caching
Draft

ci: Improve bazel caching#133
lurtz wants to merge 19 commits into
mainfrom
improved-caching

Conversation

@lurtz

@lurtz lurtz commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

At the moment the bazel caches can become huge and outdated at the same time. Thus this changes the cache handling as follows:

  • repository cache keying is unchanged. However the user repository needs a job, which rebuilds it when especially the MODULE.bazel.lock changes. Otherwise it will be incomplete and some jobs still need to download stuff from the internet instead of reusing the cache.
  • disk cache keying is changed to a timestamp based one and is unique per job. After each job run an updated cache is pushed.

This requires the presence of a dedicated cache maintenance job. This must at least rebuild the repository cache on MODULE.bazel.lock changes. In addition it shall delete the disk caches to ensure their growth is limited and outdated files are removed.

@lurtz
lurtz force-pushed the improved-caching branch from bf210b4 to ca8f343 Compare July 1, 2026 12:40
@lurtz lurtz changed the title Improved caching ci: Improve bazel caching Jul 1, 2026
lurtz added 11 commits July 1, 2026 15:38
…ssing

- Remove OLD_CACHES_JSON environment variable definition
- Update repository-cache-check to use new output-based pattern
- Update repository-cache-refresh to consume old-caches-json from check step output
- Eliminate filesystem dependency for passing cache data between steps

This change works with the updated cicd-actions repository which now properly
uses GitHub's native input/output variable mechanism instead of file paths.
@lurtz lurtz mentioned this pull request Jul 16, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants