From 35fe9c1e07464de85ea8138c574c0bc7d07c5a48 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 29 Jul 2024 12:49:31 +0200 Subject: executor: Use ApiBundle ...instead of separate local and remote instances. For tests, where different implementations of the IExecutionApi interface are used, ApiBundle instances are created by explicitly setting the struct fields instead of using ApiBundle::Create. --- src/buildtool/graph_traverser/graph_traverser.hpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/buildtool/graph_traverser/graph_traverser.hpp') diff --git a/src/buildtool/graph_traverser/graph_traverser.hpp b/src/buildtool/graph_traverser/graph_traverser.hpp index 301ef722..50eb95c5 100644 --- a/src/buildtool/graph_traverser/graph_traverser.hpp +++ b/src/buildtool/graph_traverser/graph_traverser.hpp @@ -355,8 +355,7 @@ class GraphTraverser { DependencyGraph const& g, std::vector const& artifact_ids) const -> bool { Executor executor{repo_config_, - &*apis_.local, - &*apis_.remote, + &apis_, &remote_context_, apis_.hash_function, stats_, @@ -383,15 +382,8 @@ class GraphTraverser { [[nodiscard]] auto TraverseRebuild( DependencyGraph const& g, std::vector const& artifact_ids) const -> bool { - // setup rebuilder with api for cache endpoint - auto api_cached = - apis_.MakeRemote(remote_context_.exec_config->cache_address, - remote_context_.auth, - remote_context_.retry_config); Rebuilder executor{repo_config_, - &*apis_.local, - &*apis_.remote, - &*api_cached, + &apis_, &remote_context_, apis_.hash_function, stats_, -- cgit v1.2.3