feat: enable cdc support via header#11457
Merged
tyler-french merged 1 commit intomasterfrom Mar 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in mechanism for content-defined chunking (CDC) based on a gRPC request header, enabling clients (and the cache proxy) to turn on chunking without relying solely on experiment flags.
Changes:
- Introduce
x-buildbuddy-cdc-enabledheader support viachunking.EnabledViaHeader()and make it override the existing chunking experiment flag. - Propagate the CDC header through the cache proxy and use it to enable proxy-side chunking for large writes.
- Add unit tests and Bazel BUILD deps for the new gRPC metadata usage.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| server/remote_cache/chunking/chunking.go | Adds header constant + header-based enablement logic and integrates it into Enabled(). |
| server/remote_cache/chunking/chunking_test.go | Adds tests covering header enablement and precedence vs experiment flag. |
| server/remote_cache/chunking/BUILD | Adds gRPC metadata dependency for library and tests. |
| enterprise/server/util/proxy_util/proxy_util.go | Adds CDC header to the list of headers propagated by the cache proxy. |
| enterprise/server/util/proxy_util/BUILD | Adds dependency on the chunking package for header propagation. |
| enterprise/server/byte_stream_server_proxy/byte_stream_server_proxy.go | Enables proxy-side chunking based on the CDC header (and adjusts nil cache checks). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
enterprise/server/byte_stream_server_proxy/byte_stream_server_proxy.go
Outdated
Show resolved
Hide resolved
f45ec09 to
43f2618
Compare
43f2618 to
34e192b
Compare
bduffany
approved these changes
Mar 2, 2026
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.
Now anyone can try out chunking using Buildbuddy to test: