Skip to content

[9.3.0] Harden GrpcCacheClient against misbehaving servers (https://github.co… - #30904

Closed
iancha1992 wants to merge 2 commits into
bazelbuild:release-9.3.0from
iancha1992:cp30821
Closed

iancha1992 wants to merge 2 commits into
bazelbuild:release-9.3.0from
iancha1992:cp30821

Conversation

@iancha1992

Copy link
Copy Markdown
Member

…m//pull/30819)

Fail the download early when the server sends more bytes than expected (e.g. because it ignored read_offset on a retry) and fail if the received size doesn't match the expected size even with --noremote_verify_downloads.

Work towards #30780

No

  • I have added tests for the new use cases (if any).
  • I have updated the documentation (if applicable).

RELNOTES: None

Closes #30819.

PiperOrigin-RevId: 971795439
Change-Id: I0e8eb0d2c22b29d234dbc07a6d38aaf9c25a9f13

Description

Motivation

Build API Changes

No

Checklist

  • I have added tests for the new use cases (if any).
  • I have updated the documentation (if applicable).

Release Notes

RELNOTES: None

Commit 9aae5a6

Fail the download early when the server sends more bytes than expected (e.g. because it ignored `read_offset` on a retry) and fail if the received size doesn't match the expected size even with `--noremote_verify_downloads`.

Work towards bazelbuild#30780

No

- [x] I have added tests for the new use cases (if any).
- [ ] I have updated the documentation (if applicable).

RELNOTES: None

Closes bazelbuild#30819.

PiperOrigin-RevId: 971795439
Change-Id: I0e8eb0d2c22b29d234dbc07a6d38aaf9c25a9f13
@iancha1992
iancha1992 requested a review from coeuvre August 27, 2026 21:26
@iancha1992
iancha1992 requested a review from a team as a code owner August 27, 2026 21:26
@iancha1992 iancha1992 added team-Remote-Exec Issues and PRs for the Execution (Remote) team awaiting-review PR is awaiting review from an assigned reviewer labels Aug 27, 2026
Comment thread src/test/java/com/google/devtools/build/lib/remote/GrpcCacheClientTest.java Outdated
@iancha1992
iancha1992 enabled auto-merge August 31, 2026 18:04
@iancha1992 iancha1992 closed this Sep 2, 2026
auto-merge was automatically disabled September 2, 2026 19:31

Pull request was closed

@github-actions github-actions Bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Sep 2, 2026
iancha1992 added a commit to iancha1992/bazel that referenced this pull request Sep 3, 2026
…d#30983)

### Description
Fail the download early when the server sends more bytes than expected
(e.g. because it ignored `read_offset` on a retry) and fail if the
received size doesn't match the expected size even with
`--noremote_verify_downloads`.

### Motivation
Work towards bazelbuild#30780

### Build API Changes

No

### Checklist

- [x] I have added tests for the new use cases (if any).
- [ ] I have updated the documentation (if applicable).

### Release Notes

RELNOTES: None

Closes bazelbuild#30819.

PiperOrigin-RevId: 971795439
Change-Id: I0e8eb0d2c22b29d234dbc07a6d38aaf9c25a9f13

(cherry picked from commit 9aae5a6)

9.3.0 adaptation: `RemoteOptions` exposes public fields rather than
setters on this branch, so the new test cases assign
`remoteOptions.remoteVerifyDownloads`, `.cacheCompression` and
`.cacheCompressionThreshold` directly instead of calling
`setRemoteVerifyDownloads`/`setCacheCompression`/`setCacheCompressionThreshold`.
The production change applies unchanged. `GrpcCacheClientTest` passes
locally (39 tests, up from 37 on the branch).

Opened because bazelbuild#30904 currently conflicts with the branch; a fresh pick
applies cleanly. Please close whichever of the two is redundant.

Closes bazelbuild#30821

Co-authored-by: Ian (Hee) Cha <heec@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Remote-Exec Issues and PRs for the Execution (Remote) team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants