diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-12-08 09:50:57 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-12-12 14:37:18 +0100 |
commit | 708e0ada1aa52f0627f0554ad01b8d22e099850c (patch) | |
tree | 3e0ae6f30c88ecf40807df2ac0d9beb8ce66399b /src/buildtool/serve_api/serve_service/configuration.cpp | |
parent | 93b92ef2669bed7345eadabbf71ee30c4b7929af (diff) | |
download | justbuild-708e0ada1aa52f0627f0554ad01b8d22e099850c.tar.gz |
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.
Diffstat (limited to 'src/buildtool/serve_api/serve_service/configuration.cpp')
-rw-r--r-- | src/buildtool/serve_api/serve_service/configuration.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
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; } |