summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/serve_service/target.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-25 17:40:18 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-30 12:10:06 +0200
commitc499f460cd68d505338d9c081863418a413d1c0f (patch)
tree53b93aea0b3b369c3b386a6acd4684172faa3e23 /src/buildtool/serve_api/serve_service/target.cpp
parentb5a92a60035ea3731a96bbdc8bca18986b558a05 (diff)
downloadjustbuild-c499f460cd68d505338d9c081863418a413d1c0f.tar.gz
Use RemoteContext in serve services
Also switch to using the fields from RemoteContext instances instead of those from ApiBundle.
Diffstat (limited to 'src/buildtool/serve_api/serve_service/target.cpp')
-rw-r--r--src/buildtool/serve_api/serve_service/target.cpp9
1 files changed, 4 insertions, 5 deletions
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