[9.3.0] Harden GrpcCacheClient against misbehaving servers (https://github.co… - #30904
Closed
iancha1992 wants to merge 2 commits into
Closed
iancha1992 wants to merge 2 commits into
iancha1992 wants to merge 2 commits into
Conversation
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
coeuvre
approved these changes
Aug 28, 2026
iancha1992
commented
Aug 28, 2026
iancha1992
enabled auto-merge
August 31, 2026 18:04
2 tasks
auto-merge was automatically disabled
September 2, 2026 19:31
Pull request was closed
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>
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.
…m//pull/30819)
Fail the download early when the server sends more bytes than expected (e.g. because it ignored
read_offseton a retry) and fail if the received size doesn't match the expected size even with--noremote_verify_downloads.Work towards #30780
No
RELNOTES: None
Closes #30819.
PiperOrigin-RevId: 971795439
Change-Id: I0e8eb0d2c22b29d234dbc07a6d38aaf9c25a9f13
Description
Motivation
Build API Changes
No
Checklist
Release Notes
RELNOTES: None
Commit 9aae5a6