From 708e0ada1aa52f0627f0554ad01b8d22e099850c Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 8 Dec 2023 09:50:57 +0100 Subject: serve configuration: Fix remote execution check to allow unset value In the scenario when 'just serve' acts as 'just execute', the remote execution endpoint returned by the serve service should be allowed to be empty. In this case, from the server's perspective, there is nothing to be checked, however a client might still want to ensure that its own configured serve and execution endpoints match. --- src/buildtool/serve_api/serve_service/configuration.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/buildtool/serve_api/serve_service/configuration.cpp') diff --git a/src/buildtool/serve_api/serve_service/configuration.cpp b/src/buildtool/serve_api/serve_service/configuration.cpp index 4a103ea4..a4d0ba88 100644 --- a/src/buildtool/serve_api/serve_service/configuration.cpp +++ b/src/buildtool/serve_api/serve_service/configuration.cpp @@ -24,11 +24,6 @@ auto ConfigurationService::RemoteExecutionEndpoint( ::justbuild::just_serve::RemoteExecutionEndpointResponse* response) -> ::grpc::Status { auto address = RemoteExecutionConfig::RemoteAddress(); - if (!address) { - return grpc::Status{grpc::StatusCode::INTERNAL, - "could not obtain the address of the associated " - "remote execution endpoint"}; - } - response->set_address(address->ToJson().dump()); + response->set_address(address ? address->ToJson().dump() : std::string()); return ::grpc::Status::OK; } -- cgit v1.2.3