From c499f460cd68d505338d9c081863418a413d1c0f Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 25 Jul 2024 17:40:18 +0200 Subject: Use RemoteContext in serve services Also switch to using the fields from RemoteContext instances instead of those from ApiBundle. --- src/buildtool/serve_api/serve_service/target.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/buildtool/serve_api/serve_service/target.cpp') diff --git a/src/buildtool/serve_api/serve_service/target.cpp b/src/buildtool/serve_api/serve_service/target.cpp index 16cc37a4..af6de69f 100644 --- a/src/buildtool/serve_api/serve_service/target.cpp +++ b/src/buildtool/serve_api/serve_service/target.cpp @@ -28,7 +28,6 @@ #include "src/buildtool/common/remote/retry_config.hpp" #include "src/buildtool/common/repository_config.hpp" #include "src/buildtool/common/statistics.hpp" -#include "src/buildtool/execution_api/remote/context.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/file_system/object_type.hpp" #include "src/buildtool/graph_traverser/graph_traverser.hpp" @@ -142,9 +141,9 @@ auto TargetService::CreateRemoteExecutionConfig( } // the remote and cache addresses are kept from the stored ApiBundle return RemoteExecutionConfig{ - .remote_address = apis_.remote_config.remote_address, + .remote_address = remote_context_.exec_config->remote_address, .dispatch = *std::move(res), - .cache_address = apis_.remote_config.cache_address, + .cache_address = remote_context_.exec_config->cache_address, .platform_properties = std::move(platform_properties)}; } @@ -496,8 +495,8 @@ auto TargetService::ServeTarget( // pack the remote context instances to be passed as needed RemoteContext const dispatch_context{ - .auth = &apis_.auth, - .retry_config = &apis_.retry_config, + .auth = remote_context_.auth, + .retry_config = remote_context_.retry_config, .exec_config = &(*remote_config)}; // Use a new ApiBundle that knows about local repository config and -- cgit v1.2.3