Skip to content

Disable Bazel disk cache - #2864

Merged
MarcusSorealheis merged 2 commits into
TraceMachina:mainfrom
palfrey:reduce-bazel-disk-cache
Oct 2, 2026
Merged

MarcusSorealheis merged 2 commits into
TraceMachina:mainfrom
palfrey:reduce-bazel-disk-cache

Conversation

@palfrey

@palfrey palfrey commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

What and why

On some builds e.g https://github.com/TraceMachina/nativelink/actions/runs/36993015164/job/110793339059?pr=2684 the Bazel disk cache is taking a stupid amount of time to save/restore. Of that 18 minute build, ~16 minutes were just the Bazel cache, which is really not worth it.

How was this verified?

CI, seeing if it goes faster. https://github.com/TraceMachina/nativelink/actions/runs/36997151732/job/110806385731?pr=2864 which is the same build step as the problematic example took ~4 minutes instead.

Risk

Low. Primary risk is slower builds, but not broken ones (provided this PR cleanly builds)

AI assistance

None

@vercel

vercel Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nativelink Ready Ready Preview Oct 2, 2026 4:52pm UTC
nativelink-aidm Ready Ready Preview Oct 2, 2026 4:52pm UTC

Request Review

@github-actions

This comment has been minimized.

@MarcusSorealheis MarcusSorealheis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@MarcusSorealheis
MarcusSorealheis merged commit b9a0b1e into TraceMachina:main Oct 2, 2026
45 checks passed
b7r6 added a commit to b7r6/nativelink that referenced this pull request Oct 3, 2026
…y (--config=nl-toolchain)

Realizes the warm-cache contract TraceMachina#2874 sets up. That change keys the
Bazel Dev (nix) lane's reads on the endpoint-free nl-toolchain config —
the hermetic LLVM platform + downloaded Rust toolchains that nl-rbe
already uses — because toolchains keyed on downloaded content produce
identical action digests on a bare runner, inside nix develop, or on a
remote worker. But nobody writes that digest space yet: the trusted
main-push Bazel 9 lane (the only holder of a write key) warms with bare
--extra_toolchains, host-toolchain keys the Dev lane can never hit.

Switch the Bazel 9 lane from --extra_toolchains=@rust_toolchains//:all
to --config=nl-toolchain (which contains that same line plus the @llvm
platform pin). On main pushes this lane becomes the warmer for the
hermetic digest space; on PRs it reads from it. The Bazel 8 lane is
untouched (separate, lockfile_mode=off digest space).

Transition cost, stated honestly: the first runs after this merges are
cold for everyone until the first main push warms the new key space —
one build. Measured so far is key ALIGNMENT, not the warm win: the
aquery proof run shows nix+nl-toolchain command lines byte-identical to
bare-runner nl-toolchain with no /nix/store references
(https://github.com/b7r6/nativelink/actions/runs/37059855343). The warm
hit-rate itself cannot be measured from a fork (no write credentials);
projected from the Bazel 9 lane's current warm behavior, the Dev lane
drops from ~11 min to roughly the Native lane's ~5 min.

Stacked on TraceMachina#2874 (requires its nl-toolchain config). Builds on the
remote-cache lanes and @palfrey's TraceMachina#2864 disk-cache handling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
Preview – nativelink — e07c22d0 Deployed Oct 2, 2026 by vercel[bot]
Preview – nativelink-aidm — e07c22d0 Deployed Oct 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants