Repository navigation
bazel: run CopyToDirectory locally in CI instead of via the cache - #12092
Merged
maliberty merged 2 commits intoNov 1, 2026
Conversation
The hermetic toolchain stages libc++ headers (~1,700 files) with a CopyToDirectory action that every C++ compile depends on. A cache hit for that tree artifact checks every file, and on a cold or busy disk cache it took 160-380 s in CI while all compiles waited. Running the copy locally takes well under a second. Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the .bazelrc configuration file to modify the execution info for CI builds. Specifically, it adds build:ci --modify_execution_info=CopyToDirectory=+no-cache to ensure that CopyToDirectory staging runs locally instead of using the disk cache, preventing potential delays on cold or busy disk caches. There are no review comments, and I have no additional feedback to provide.
The Docker and release builds use --config=release, so the CI-only setting did not reach them, and they stalled up to 435 s on the libc++ header tree copy. Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The hermetic LLVM toolchain stages the libc++ headers (~1,700 files, 16 MB) into one include directory with a bazel_lib
CopyToDirectoryaction (@llvm-project//libcxx:libcxx_headers_include_search_directory, in both target and exec configs). Every C++ compile in that configuration takes the directory as an input, so nothing downstream can even start a cache lookup until the copy finishes.In CI (e.g. PR-12091-merge #1) this action sat in the
disk-cachestage for 160–380 s on cold or busy nodes while every compile waited ((16 actions, 0 running)). A cache hit on a tree artifact checks every file; running the copy locally takes well under a second.This adds
build:ci --modify_execution_info=CopyToDirectory=+no-cache, so allCopyToDirectoryactions in CI run locally and skip both caches. They are all cheap file copies.