Skip to content

fix: github actions' bazel cache #445

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jul 29, 2025
Merged

Conversation

leonm1
Copy link
Contributor

@leonm1 leonm1 commented Jul 28, 2025

GitHub's actions cache appears to be empty, even with recent pushes to main. This config has been working well in Google's github.com/GoogleCloudPlatform/service-extensions repo [1], which should be building all the same things as this repo. Using --disk_cache avoids putting a bunch of junk in the cache that the previous xdg cache dir entry had to manually strip out.

image

GitHub's actions cache appears to be empty, even with recent pushes to main. This config has been working well in Google's github.com/GoogleCloudPlatform/service-extensions repo, which should be building all the same things as this repo. Using --disk_cache avoids putting a bunch of junk in the cache that the previous xdg cache dir entry had to manually strip out.

Signed-off-by: Matt Leon <mattleon@google.com>
Copy link
Contributor

@mpwarres mpwarres left a comment

Choose a reason for hiding this comment

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

LGTM, but can you elaborate on "Using --disk_cache avoids putting a bunch of junk in the cache that the previous xdg cache dir entry had to manually strip out"? Is --disk_cache more selective in what it caches?

@leonm1
Copy link
Contributor Author

leonm1 commented Jul 29, 2025

Yes! The --disk_cache option only caches action outputs (https://bazel.build/remote/caching), whereas ~/.cache/bazel contains the entire bazel output root (https://bazel.build/remote/output-directories#layout).

Some things which exist in the bazel output root which are completely unnecessary to be cached:

  • Uncompressed java binaries and scripts used by the bazel runtime
  • Sandbox root working directory
  • Debug output for each command run
  • Source and temporary files for all repos referenced in the WORKSPACE file (this will be big with the addition of hermetic_llvm)

@leonm1 leonm1 requested a review from mpwarres July 29, 2025 13:45
@mpwarres
Copy link
Contributor

Yes! The --disk_cache option only caches action outputs (https://bazel.build/remote/caching), whereas ~/.cache/bazel contains the entire bazel output root (https://bazel.build/remote/output-directories#layout).

Great--thanks!

@leonm1 leonm1 merged commit 74f8572 into proxy-wasm:main Jul 29, 2025
29 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants