[9.3.0] remote: add gRPC service config support - #30666
Open
sluongng wants to merge 1 commit into
Open
Conversation
Remote cache users currently have one `--remote_timeout` value that applies across remote gRPC calls. That is a poor fit because fast control-plane RPCs such as action cache lookups benefit from short deadlines, while ByteStream reads and writes may need much longer deadlines for large blobs. Setting the flag too low can make uploads or downloads fail consistently; setting it too high makes stale requests wait too long before Bazel retries. This follows the direction discussed in bazelbuild#26741. This PR keeps the default user experience unchanged while moving remote gRPC timeout handling onto service config, then adds an opt-in advanced override. It is structured as two commits: - `remote: drive gRPC deadlines from service config` generates the same timeout policy Bazel previously applied from `--remote_timeout`, installs it on remote gRPC channels, and removes per-stub deadline plumbing. - `remote: accept gRPC service config files` adds `--remote_grpc_service_config` for a user-owned JSON file. The initial supported schema is intentionally restricted to `methodConfig`, `name`, and `timeout`; unsupported fields such as retry, hedging, load balancing, and health checking are rejected so Bazel can expand support deliberately later. Closes bazelbuild#29912. PiperOrigin-RevId: 952089183 Change-Id: I0101d0cafb9e7593a16c4106372d288c8ef0237c (cherry picked from commit 3510ade)
sluongng
force-pushed
the
sluongng/cherrypick-29912-9.3.0
branch
from
August 11, 2026 12:46
086dae5 to
224e157
Compare
sluongng
marked this pull request as ready for review
August 11, 2026 13:53
coeuvre
approved these changes
Aug 12, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 12, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 12, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 12, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 12, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 12, 2026
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.
Remote cache users currently have one
--remote_timeoutvalue thatapplies across remote gRPC calls. That is a poor fit because fast
control-plane RPCs such as action cache lookups benefit from short
deadlines, while ByteStream reads and writes may need much longer
deadlines for large blobs. Setting the flag too low can make uploads or
downloads fail consistently; setting it too high makes stale requests
wait too long before Bazel retries.
This follows the direction discussed in
#26741.
This PR keeps the default user experience unchanged while moving remote
gRPC timeout handling onto service config, then adds an opt-in advanced
override.
It is structured as two commits:
remote: drive gRPC deadlines from service configgenerates the sametimeout policy Bazel previously applied from
--remote_timeout,installs it on remote gRPC channels, and removes per-stub deadline
plumbing.
remote: accept gRPC service config filesadds--remote_grpc_service_configfor a user-owned JSON file. The initialsupported schema is intentionally restricted to
methodConfig,name, andtimeout; unsupported fields such as retry, hedging,load balancing, and health checking are rejected so Bazel can expand
support deliberately later.
Cherry-pick of #29912.