Skip to content

feat: enable cdc support via header#11457

Merged
tyler-french merged 1 commit intomasterfrom
tfrench/header
Mar 2, 2026
Merged

feat: enable cdc support via header#11457
tyler-french merged 1 commit intomasterfrom
tfrench/header

Conversation

@tyler-french
Copy link
Contributor

Now anyone can try out chunking using Buildbuddy to test:

  1. Sign up for a trial/free account at https://www.buildbuddy.io/
  2. Get a token with write access
  3. Use Bazel Fork from Support remote cache CDC bazelbuild/bazel#28437
  4. Build!
USE_BAZEL_VERSION="tyler-french/9.1.0-cdc" bazel build //... \
  --disk_cache= \
  --experimental_remote_cache_chunking \
  --remote_header=x-buildbuddy-cdc-enabled=true \
  --check_direct_dependencies=off \
  --remote_cache=grpcs://remote.buildbuddy.io

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

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-enabled header support via chunking.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.

@tyler-french tyler-french force-pushed the tfrench/header branch 2 times, most recently from f45ec09 to 43f2618 Compare March 2, 2026 17:47
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.

Nice!

@tyler-french tyler-french merged commit 36f1665 into master Mar 2, 2026
13 checks passed
@tyler-french tyler-french deleted the tfrench/header branch March 2, 2026 19:31
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.

4 participants