[6.0.0] [remote] Respect whether the server supports action cache updates#16724
Merged
meteorcloudy merged 3 commits intobazelbuild:release-6.0.0from Nov 10, 2022
Conversation
…ates Only a subset of users may be allowed to update the action cache (e.g., only CI but not devs). Today, there are 2 ways to achive the desired behavior: - `GetCapabilities` returning that all users are allowed to update, and `UpdateActionResult` returning an error that Bazel prints and ignores, or - have the users that are not allowed to update the action cache set `--remote_upload_local_results=false`. Why don't we instead respect whether the remote cache supports uploading action results? Note that this requires support from the remote system to fully work (i.e., it needs to return `update_enabled = false` for users that don't have permission). Otherwise, Bazel's behavior will be the same as before this change: failed `UpdateActionResult` do not cause the build to fail. The only change this introduces is that Bazel will no longer error if `--remote_upload_local_results=true` and `GetCapabilities` returning `update_enabled = false`. Closes bazelbuild#16624. PiperOrigin-RevId: 486901751 Change-Id: I0991f6891e21711df1e23ae0998a8bc95e2389bc
Contributor
Author
Member
|
@coeuvre Please LGTM if this looks good to be cherry-picked for 6.0 ;) |
coeuvre
approved these changes
Nov 10, 2022
Member
coeuvre
left a comment
There was a problem hiding this comment.
Yes, it's safe to cherry-pick this into 6.0.
Member
|
@Yannic Can you rebase? |
Contributor
Author
|
thanks! done |
This was referenced May 30, 2023
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.
Only a subset of users may be allowed to update the action cache (e.g., only CI but not devs).
Today, there are 2 ways to achive the desired behavior:
GetCapabilitiesreturning that all users are allowed to update, andUpdateActionResultreturning an error that Bazel prints and ignores, or--remote_upload_local_results=false.Why don't we instead respect whether the remote cache supports uploading action results?
Note that this requires support from the remote system to fully work (i.e., it needs to return
update_enabled = falsefor users that don't have permission). Otherwise, Bazel's behavior will be the same as before this change: failedUpdateActionResultdo not cause the build to fail. The only change this introduces is that Bazel will no longer error if--remote_upload_local_results=trueandGetCapabilitiesreturningupdate_enabled = false.Closes #16624.
PiperOrigin-RevId: 486901751
Change-Id: I0991f6891e21711df1e23ae0998a8bc95e2389bc