Is anyone using GCS as a remote cache with Pants? ...
# general
a
Is anyone using GCS as a remote cache with Pants? I'm getting this error
Copy code
[WARN] Failed to read from remote cache (2 occurrences so far): Internal: "protocol error: received message with invalid compression flag: 60 (valid flags are 0 and 1) while receiving response with status: 400 Bad Request"
I'm not the first one to hit the
invalid compression flag: 60
but it seems the others were always due to size rather than bad request.
Is there any way I can have Pants easily log all of its GRPC requests? I can see the TLS handshake happening successfully but then it doesn't print out the request that's getting the invalid response message.
f
It's logged from the Rust side. So make sure to set
RUST_LOG=debug
env and set
--log-show-rust-3rdparty
on the Pants CLI. https://www.pantsbuild.org/prerelease/reference/global-options#log_show_rust_3rdparty
If you want to cut down on the number of Rust log messages, set
RUST_LOG
to focus on the
grpc_util
(Pants) and third--party
tonic
crates.
a
I have
RUST_LOG=trace
but not really seeing anything. I'm certain that the compression mode issue is a red herring and that it's trying to decode the 400 response into the protobuf object it expects but I've been unsuccessfully trying to figure out why I'm getting that 400 error.
Fortunately we pay for GCP support so I am going to open a ticket and will report back if I discover anything that might be worth adding to the docs.
fwiw even with
RUST_LOG=trace,grpc_util=trace,tonic=trace pants --no-local-cache --log-show-rust-3rdparty -ltrace
I am unable to see the contents of the bad request error - which is frustrating because I'm wondering if it may be this same error https://github.com/bazelbuild/bazel/issues/11854