-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize Bazel CI performance #312
Conversation
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
When cached, this should bring the Bazel CI runtime down to around a minute-thirty. Latest run in this PR: https://github.com/bufbuild/protovalidate/actions/runs/13320833173 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to manually clear caches periodically though, since the approach used to save/restore the bazel cache is naive.
What is the negative consequence of not clearing the cache periodically? Slower cache sync because size keeps increasing? Failed builds due to disk filling up? Can we document how to do this somewhere?
The consequence is that the cache gets increasingly stale. It'd be ideal if it wrote back in a concurrency-safe way, but there are downsides to just telling GHA to always write back. Probably just need to look into if there's a better cache integration for Bazel specifically. |
This should improve performance for the Bazel CI workflow, and ensure that it is cached more often. We will need to manually clear caches periodically though, since the approach used to save/restore the bazel cache is naive. (This is also true for the main CI rule, unfortunately. Maybe there is a more advanced Bazel cache integration for GitHub Actions.)