Skip to content

Fix Bazel builds on Ubuntu 26.04 and clean up old caches - #694

Open
fruffy wants to merge 6 commits into
mainfrom
fix/bazel-cache-retention
Open

fruffy wants to merge 6 commits into
mainfrom
fix/bazel-cache-retention

Conversation

@fruffy

@fruffy fruffy commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

This fixes three things in the Bazel build:

  • Stop reusing caches from a different Ubuntu image or Bazel version, which was causing build failures.
  • Clean up old and unused caches so they don't keep taking up space.
  • Update BoringSSL so it builds with the newer compiler and system libraries on Ubuntu 26.04.

With these fixes, we can undo the temporary Ubuntu 24.04 pin from #698 and use ubuntu-latest again.

Scope full Bazel caches to runner image, architecture, and Bazel version so Ubuntu runner upgrades cannot reuse a stale detected C/C++ toolchain.

Use per-run main/PR keys with scoped restore fallbacks, and run daily cache maintenance through the shared p4lang/.github action.

Fixes the cache-related Bazel failure in #689. Shared action: p4lang/.github#22.

Signed-off-by: fruffy <fruffy@nyu.edu>
@github-actions github-actions Bot added the github_actions Pull requests that update GitHub Actions code label Nov 2, 2026
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
Require the first BoringSSL snapshot after upstream moved its crypto implementation to C++. Its const-correct memchr overloads compile with glibc 2.43, unlike the C wrapper selected by gRPC 1.76.0.

Combine this dependency update from #699 with the cache isolation in #694 so that Ubuntu 26.04 CI can build with a compatible local toolchain.

Signed-off-by: fruffy <fruffy@nyu.edu>
@fruffy
fruffy requested a review from jafingerhut November 14, 2026 01:33
Comment thread MODULE.bazel

bazel_dep(name = "bazel_skylib", version = "1.9.0")
bazel_dep(name = "boost.container_hash", version = "1.90.0.bcr.1")
bazel_dep(name = "boringssl", version = "0.20241209.0", repo_name = None)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jafingerhut This fixes the Ubuntu 24.04 compilation issues.

Signed-off-by: fruffy <fruffy@nyu.edu>
…26.04 is fixed (#698)"

This reverts commit 712328d.

Signed-off-by: fruffy <fruffy@nyu.edu>
@fruffy fruffy changed the title Isolate Bazel caches and prune stale build caches Fix Bazel builds on Ubuntu 26.04 and clean up old caches Nov 15, 2026
@jafingerhut

Copy link
Copy Markdown
Contributor

I can approve if you wish, but it would be great if @chreekat could take a look at it, both for his knowledge of changes going in, and preferably also for his more knowledgeable review than I can give.

FYI using a similar boringssl version specification in the p4runtime repository does not fix the build issue with ubuntu-26.04 in that repository. Not sure why yet. It is not urgent by any means. p4lang/p4runtime#650 (comment)

@jafingerhut
jafingerhut requested a review from chreekat November 15, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants