Skip to content

cleanup: return NotFound if blob stored w/o chunking#11395

Merged
tyler-french merged 1 commit intomasterfrom
tfrench/cleanup-manifest
Feb 25, 2026
Merged

cleanup: return NotFound if blob stored w/o chunking#11395
tyler-french merged 1 commit intomasterfrom
tfrench/cleanup-manifest

Conversation

@tyler-french
Copy link
Contributor

@tyler-french tyler-french commented Feb 23, 2026

This PR cleans up the implementation to adhere to the improved spec, and replaces Unimplemented with a more accurate NotFound error.

https://github.com/bazelbuild/remote-apis/blob/main/build/bazel/remote/execution/v2/remote_execution.proto#L494-L496

  // * `NOT_FOUND`: The requested blob is not present in the CAS, OR there is no
  //   split information available for the blob, OR at least one chunk needed to
  //   reconstruct the blob is missing from the CAS.

bazelbuild/remote-apis@080cf12 (bazelbuild/remote-apis#353) clarified that the SplitBlob server can return NOT_FOUND if the blob exists but is stored without chunking.

@tyler-french tyler-french requested review from bduffany and Copilot and removed request for Copilot February 23, 2026 22:06
Copilot AI review requested due to automatic review settings February 23, 2026 22:08
@tyler-french tyler-french force-pushed the tfrench/cleanup-manifest branch from 5c75238 to 576c8f2 Compare February 23, 2026 22:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the implementation to align with a clarification in the Remote Execution API specification regarding the SplitBlob RPC. According to the updated spec, SplitBlob should return NOT_FOUND not only when a blob doesn't exist, but also when a blob exists but was stored without chunking metadata. The PR simplifies the code by removing logic that tried to distinguish between these cases and return different error codes.

Changes:

  • Removed comment explaining the old behavior of returning Unimplemented for blobs stored without chunking
  • Simplified error handling in LoadManifest to always return the sanitized error without checking if the blob exists
  • Removed unit test that verified Unimplemented error was returned for blobs that exist but lack chunking metadata

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
server/remote_cache/content_addressable_storage_server/content_addressable_storage_server.go Removed outdated TODO comment explaining the old behavior
server/remote_cache/chunking/chunking.go Simplified LoadManifest error handling to return NOT_FOUND in all cases, removed errors import
server/remote_cache/chunking/chunking_test.go Removed test that verified old behavior of returning Unimplemented for blobs without chunking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tyler-french tyler-french force-pushed the tfrench/cleanup-manifest branch from 576c8f2 to f2379e9 Compare February 24, 2026 17:36
@tyler-french tyler-french enabled auto-merge (squash) February 24, 2026 18:49
@tyler-french tyler-french force-pushed the tfrench/cleanup-manifest branch from f2379e9 to 5037fcf Compare February 24, 2026 22:12
@tyler-french tyler-french requested review from maggie-lou and removed request for bduffany February 24, 2026 22:13
Copy link
Collaborator

@maggie-lou maggie-lou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change LGTM, but is there a world where we'd want the server to return the blob even if it is stored without chunking? Or is that unlikely to happen anyway once we're fully migrated to the CDC cache?

@tyler-french tyler-french merged commit 4e5b04d into master Feb 25, 2026
13 checks passed
@tyler-french tyler-french deleted the tfrench/cleanup-manifest branch February 25, 2026 14:21
@tyler-french
Copy link
Contributor Author

This change LGTM, but is there a world where we'd want the server to return the blob even if it is stored without chunking? Or is that unlikely to happen anyway once we're fully migrated to the CDC cache?

Yes, I'd like to experiment with on-demand chunking. Maybe even using an executor to split the blob. Added to https://github.com/buildbuddy-io/buildbuddy-internal/issues/6426

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants