It's currently not possible to pass extra HTTP headers to the remote cache. I would like to be able to do something like this:
bazel build --remote_http_cache=$SOME_URL --remote_http_header="Build-Id: some-id" --remote_http_header="Product-Name: Some-Name"
The idea is to allow for custom logic in the remote http cache to keep metrics about cache usage on a per-product or per-build basis.
SGTM. It seems like a good idea to also support this for gRPC as it's HTTP/2 after all.
I think I'd prefer a format like --remote_header=Name=Value
.
@ob are you planning to add support for GRPC headers?
I'm not sure how to do that. I'm not familiar with that section of the code. I'll take a look but if you have any pointers on what would need to be done I'd appreciate it.
Most helpful comment
SGTM. It seems like a good idea to also support this for gRPC as it's HTTP/2 after all.
I think I'd prefer a format like
--remote_header=Name=Value
.