diff options
Diffstat (limited to 'src/buildtool/serve_api/serve_service')
-rw-r--r-- | src/buildtool/serve_api/serve_service/target.cpp | 4 | ||||
-rw-r--r-- | src/buildtool/serve_api/serve_service/target.hpp | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/buildtool/serve_api/serve_service/target.cpp b/src/buildtool/serve_api/serve_service/target.cpp index 3ee2a3b1..6cae3d8b 100644 --- a/src/buildtool/serve_api/serve_service/target.cpp +++ b/src/buildtool/serve_api/serve_service/target.cpp @@ -46,7 +46,7 @@ auto TargetService::GetDispatchList( ArtifactDigest const& dispatch_digest) noexcept - -> expected<dispatch_t, ::grpc::Status> { + -> expected<std::vector<DispatchEndpoint>, ::grpc::Status> { // get blob from remote cas auto const& dispatch_info = Artifact::ObjectInfo{.digest = dispatch_digest, .type = ObjectType::File}; @@ -142,7 +142,7 @@ auto TargetService::ServeTarget( // Important: we will need to pass these platform properties also to the // executor (via the graph_traverser) in order for the build to be properly // dispatched to the correct remote-execution endpoint. - auto platform_properties = std::map<std::string, std::string>{}; + auto platform_properties = ExecutionProperties{}; for (auto const& p : request->execution_properties()) { platform_properties[p.name()] = p.value(); } diff --git a/src/buildtool/serve_api/serve_service/target.hpp b/src/buildtool/serve_api/serve_service/target.hpp index 1ce7fad2..aaf9bb39 100644 --- a/src/buildtool/serve_api/serve_service/target.hpp +++ b/src/buildtool/serve_api/serve_service/target.hpp @@ -139,17 +139,13 @@ class TargetService final : public justbuild::just_serve::Target::Service { ServeApi const* const serve_ = nullptr; std::shared_ptr<Logger> logger_{std::make_shared<Logger>("target-service")}; - // type of dispatch list; reduces verbosity - using dispatch_t = std::vector< - std::pair<std::map<std::string, std::string>, ServerAddress>>; - /// \brief Get from remote and parse the endpoint configuration. The method /// also ensures the content has the expected format. /// \returns The dispatch list stored as JSON object on success or an /// unexpected error as grpc::Status. [[nodiscard]] auto GetDispatchList( ArtifactDigest const& dispatch_digest) noexcept - -> expected<dispatch_t, ::grpc::Status>; + -> expected<std::vector<DispatchEndpoint>, ::grpc::Status>; /// \brief Handles the processing of the log after a failed analysis or /// build. Will populate the response as needed and set the status to be |