buchgr / bazel-remote

A remote cache for Bazel
https://bazel.build
Apache License 2.0
576 stars 150 forks source link

GRPC proxy failure to another bazel-remote `expected magic number not found` #751

Closed liam-baker-sm closed 1 month ago

liam-baker-sm commented 1 month ago

Setup: Local test server in docker container, compressed storage (zstd). Remote server, compressed storage (zstd) Version: 2.4.4 bazel_remote_arguments (local test server): --max_size=100 --grpc_proxy.url=grpcs://bazel-cache.domain:8443 Upstream fetches fail with the following error (note: real object hash replaced with the empty hash for confidentiality)

2024/05/29 01:14:07 GRPC PROXY READ CAS e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855: Completed
2024/05/29 01:14:07 GRPC BYTESTREAM READ FAILED: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 expected magic number not found

Works fine if using --max_size=100 --http_proxy.url=https://bazel-cache.domain --storage_mode=uncompressed Bazel builds use the GRPCS url without issue.

mostynb commented 1 month ago

Thanks for the bug report- I pushed a fix to the master branch.