[8.2.0] Don't fetch empty digest on failure status in `FetchBlobResponse` (#25277)
When the `GrpcRemoteDownloader` receives a `FetchBlobResponse` with an error status (instead of a connection level status error), it must fail and fall back to the HTTP downloader if configured instead of ignoring the status and attempting to fetch the (usually empty) digest from the cache. The previous behavior could result in errors being masked and resulting in an empty file being downloaded if the remote cache accepts empty `Digest` messages. Closes #25244. PiperOrigin-RevId: 725963696 Change-Id: I9f643b944b9fff9264c72f41485564ff1fab71d9 Commit https://github.com/bazelbuild/bazel/commit/e0cd2f245491f93065e5e04106a9b6e7eb029292 Co-authored-by:Fabian Meumertzheim <fabian@meumertzhe.im> Co-authored-by:
Ian (Hee) Cha <heec@google.com>
Showing
- src/main/java/com/google/devtools/build/lib/remote/downloader/BUILD 1 addition, 0 deletions...ava/com/google/devtools/build/lib/remote/downloader/BUILD
- src/main/java/com/google/devtools/build/lib/remote/downloader/GrpcRemoteDownloader.java 5 additions, 0 deletions...ols/build/lib/remote/downloader/GrpcRemoteDownloader.java
- src/test/java/com/google/devtools/build/lib/remote/downloader/BUILD 1 addition, 0 deletions...ava/com/google/devtools/build/lib/remote/downloader/BUILD
- src/test/java/com/google/devtools/build/lib/remote/downloader/GrpcRemoteDownloaderTest.java 46 additions, 0 deletions...build/lib/remote/downloader/GrpcRemoteDownloaderTest.java
Please register or sign in to comment