From 154ee19c25d847243f879bde38780f5656877a3c Mon Sep 17 00:00:00 2001 From: Clint Harrison <243356+clintharrison@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:12:57 -0400 Subject: [PATCH] Increase gRPC max recv message size in Bazel client --- src/main/cpp/blaze.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc index 0bbfa8676ec02d..06e835e71f1d0b 100644 --- a/src/main/cpp/blaze.cc +++ b/src/main/cpp/blaze.cc @@ -1627,6 +1627,9 @@ bool BlazeServer::Connect() { // locally over gRPC; so we want to ignore any configured proxies when setting // up a gRPC channel to the server. channel_args.SetInt(GRPC_ARG_ENABLE_HTTP_PROXY, 0); + // The Bazel server may send responses larger than the default (4 MiB), e.g. + // when an invocation has a very large failure detail. + channel_args.SetMaxReceiveMessageSize(20 * 1024 * 1024); std::shared_ptr channel(grpc::CreateCustomChannel( port, grpc::InsecureChannelCredentials(), channel_args)); std::unique_ptr client(CommandServer::NewStub(channel));