Skip to content

[9.3.0] remote: add gRPC service config support - #30666

Open
sluongng wants to merge 1 commit into
bazelbuild:release-9.3.0from
sluongng:sluongng/cherrypick-29912-9.3.0
Open

[9.3.0] remote: add gRPC service config support#30666
sluongng wants to merge 1 commit into
bazelbuild:release-9.3.0from
sluongng:sluongng/cherrypick-29912-9.3.0

Conversation

@sluongng

@sluongng sluongng commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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
#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.

Cherry-pick of #29912.

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
sluongng force-pushed the sluongng/cherrypick-29912-9.3.0 branch from 086dae5 to 224e157 Compare August 11, 2026 12:46
@sluongng
sluongng marked this pull request as ready for review August 11, 2026 13:53
@sluongng
sluongng requested a review from a team as a code owner August 11, 2026 13:53
@github-actions github-actions Bot added team-Core Skyframe, bazel query, BEP, options parsing, bazelrc team-Remote-Exec Issues and PRs for the Execution (Remote) team awaiting-review PR is awaiting review from an assigned reviewer labels Aug 11, 2026
@iancha1992
iancha1992 requested a review from coeuvre August 11, 2026 18:33
@coeuvre
coeuvre added this pull request to the merge queue Aug 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 12, 2026
@iancha1992
iancha1992 added this pull request to the merge queue Aug 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 12, 2026
@iancha1992
iancha1992 added this pull request to the merge queue Aug 12, 2026
@iancha1992 iancha1992 changed the title remote: add gRPC service config support [9.3.0] remote: add gRPC service config support Aug 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 12, 2026
@iancha1992
iancha1992 added this pull request to the merge queue Aug 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 12, 2026
@iancha1992
iancha1992 added this pull request to the merge queue Aug 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR is awaiting review from an assigned reviewer team-Core Skyframe, bazel query, BEP, options parsing, bazelrc team-Remote-Exec Issues and PRs for the Execution (Remote) team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants