Add the --experimental_remote_require_cached flag#18942
Closed
jmmv wants to merge 1 commit intobazelbuild:masterfrom
Closed
Add the --experimental_remote_require_cached flag#18942jmmv wants to merge 1 commit intobazelbuild:masterfrom
--experimental_remote_require_cached flag#18942jmmv wants to merge 1 commit intobazelbuild:masterfrom
Conversation
coeuvre
requested changes
Jul 17, 2023
src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java
Outdated
Show resolved
Hide resolved
1a60a39 to
3e8618b
Compare
Contributor
Author
|
I've updated the description of the PR as well as the one in the commit (which required a force-push) to more clearly explain how this flag is useful. I don't think the original thing I wrote made a lot of sense. |
When set to true, this flag causes Bazel to abort the build whenever it encounters an action that is not cached. This is very useful when trying to troubleshoot action caching issues across machines because it allows running a build on one and having it fail on another as soon as there is a problem without tainting what already exists in the cache. My workflow is to essentially do: 1. Machine 1: bazel clean 2. Machine 1: bazel build ... 3. Machine 2: bazel clean 4. Machine 2: bazel build --experimental_remote_require_cached ... which makes step 4 fail on the first action that wasn't cached as expected. Then I can address that problem and re-run step 4 to encounter the next issue.
3e8618b to
7df859a
Compare
--experimental_remote_require_cached flag
Contributor
|
@bazel-io flag |
Member
|
@bazel-io fork 6.4.0 |
iancha1992
pushed a commit
to iancha1992/bazel
that referenced
this pull request
Jul 25, 2023
When set to true, this flag causes Bazel to abort the build whenever it encounters an action that is not cached. This is very useful when trying to troubleshoot action caching issues across machines because it allows running a build on one and having it fail on another as soon as there is a problem without tainting what already exists in the cache. My workflow is to essentially do: 1. Machine 1: bazel clean 2. Machine 1: bazel build ... 3. Machine 2: bazel clean 4. Machine 2: bazel build --remote_require_cached ... which makes step 4 fail on the first action that wasn't cached as expected. Then I can address that problem and re-run step 4 to encounter the next issue. Closes bazelbuild#18942. PiperOrigin-RevId: 549242966 Change-Id: Ib46a2eb8cce6f4444968882e99c21284fc6bc4f8
iancha1992
added a commit
that referenced
this pull request
Jul 26, 2023
When set to true, this flag causes Bazel to abort the build whenever it encounters an action that is not cached. This is very useful when trying to troubleshoot action caching issues across machines because it allows running a build on one and having it fail on another as soon as there is a problem without tainting what already exists in the cache. My workflow is to essentially do: 1. Machine 1: bazel clean 2. Machine 1: bazel build ... 3. Machine 2: bazel clean 4. Machine 2: bazel build --remote_require_cached ... which makes step 4 fail on the first action that wasn't cached as expected. Then I can address that problem and re-run step 4 to encounter the next issue. Closes #18942. PiperOrigin-RevId: 549242966 Change-Id: Ib46a2eb8cce6f4444968882e99c21284fc6bc4f8 Co-authored-by: Julio Merino <julio.merino+oss@snowflake.com>
Member
|
The changes in this PR have been included in Bazel 6.4.0 RC1. Please test out the release candidate and report any issues as soon as possible. If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=last_rc. |
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.
When set to true, this flag causes Bazel to abort the build whenever it encounters an action that is not cached.
This is very useful when trying to troubleshoot action caching issues across machines because it allows running a build on one and having it fail on another as soon as there is a problem without tainting what already exists in the cache.
My workflow is to essentially do:
which makes step 4 fail on the first action that wasn't cached as expected. Then I can address that problem and re-run step 4 to encounter the next issue.