-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[remote] Respect whether the server supports action cache updates #16624
[remote] Respect whether the server supports action cache updates #16624
Conversation
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`.
@Yannic what do you think about printing an info- or warning-level message if remote_upload_local_results=true but the server returns update_enabled=false? Maybe something like "INFO: remote cache has disabled action result uploads, so --remote_upload_local_results setting will be ignored." Asking because users might be confused by action uploads silently not working, especially if they are intentionally passing --remote_upload_local_results at the command line (though I understand the messaging might be considered "noise" if users don't care whether their results are uploaded or not). "Why wasn't |
@bduffany That sounds reasonable, at least for a transition period. It's also known server-side, so it would be possible to add a warning server-side for that (e.g., on the result page). |
This reverts commit d63c5c8.
@bazel-io flag |
I'd like to get this into 6.0.0 if at all possible |
…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
…ates (#16724) 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 #16624. PiperOrigin-RevId: 486901751 Change-Id: I0991f6891e21711df1e23ae0998a8bc95e2389bc
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, andUpdateActionResult
returning 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 = false
for users that don't have permission). Otherwise, Bazel's behavior will be the same as before this change: failedUpdateActionResult
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
andGetCapabilities
returningupdate_enabled = false
.