diff options
Diffstat (limited to 'src/buildtool/execution_api/common')
-rw-r--r-- | src/buildtool/execution_api/common/TARGETS | 4 | ||||
-rw-r--r-- | src/buildtool/execution_api/common/api_bundle.cpp | 6 | ||||
-rw-r--r-- | src/buildtool/execution_api/common/api_bundle.hpp | 5 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/buildtool/execution_api/common/TARGETS b/src/buildtool/execution_api/common/TARGETS index 01c152c8..a7cfd64c 100644 --- a/src/buildtool/execution_api/common/TARGETS +++ b/src/buildtool/execution_api/common/TARGETS @@ -45,14 +45,14 @@ , ["src/buildtool/auth", "auth"] , ["src/buildtool/common", "config"] , ["src/buildtool/common/remote", "remote_common"] + , ["src/buildtool/common/remote", "retry_config"] , ["src/buildtool/execution_api/local", "config"] , ["src/buildtool/execution_api/remote", "config"] , ["src/buildtool/storage", "config"] , ["src/buildtool/storage", "storage"] ] , "private-deps": - [ ["src/buildtool/common/remote", "retry_config"] - , ["src/buildtool/execution_api/bazel_msg", "bazel_msg"] + [ ["src/buildtool/execution_api/bazel_msg", "bazel_msg"] , ["src/buildtool/execution_api/local", "local"] , ["src/buildtool/execution_api/remote", "bazel"] ] diff --git a/src/buildtool/execution_api/common/api_bundle.cpp b/src/buildtool/execution_api/common/api_bundle.cpp index ba4a434c..38255f9a 100644 --- a/src/buildtool/execution_api/common/api_bundle.cpp +++ b/src/buildtool/execution_api/common/api_bundle.cpp @@ -25,13 +25,15 @@ ApiBundle::ApiBundle( gsl::not_null<LocalExecutionConfig const*> const& local_exec_config, RepositoryConfig const* repo_config, gsl::not_null<Auth const*> const& authentication, + gsl::not_null<RetryConfig const*> const& retry_config, gsl::not_null<RemoteExecutionConfig const*> const& remote_exec_config) : local{std::make_shared<LocalApi>(storage_config, storage, local_exec_config, repo_config)}, // needed by remote auth{*authentication}, // needed by remote - remote_config{*remote_exec_config}, // needed by remote + retry_config{*retry_config}, // needed by remote + remote_config{*remote_exec_config}, remote{CreateRemote(remote_exec_config->remote_address)} {} auto ApiBundle::CreateRemote(std::optional<ServerAddress> const& address) const @@ -43,7 +45,7 @@ auto ApiBundle::CreateRemote(std::optional<ServerAddress> const& address) const address->host, address->port, &auth, - &RetryConfig::Instance(), + &retry_config, config); } return local; diff --git a/src/buildtool/execution_api/common/api_bundle.hpp b/src/buildtool/execution_api/common/api_bundle.hpp index 017154c1..5414423e 100644 --- a/src/buildtool/execution_api/common/api_bundle.hpp +++ b/src/buildtool/execution_api/common/api_bundle.hpp @@ -21,6 +21,7 @@ #include "gsl/gsl" #include "src/buildtool/auth/authentication.hpp" #include "src/buildtool/common/remote/remote_common.hpp" +#include "src/buildtool/common/remote/retry_config.hpp" #include "src/buildtool/common/repository_config.hpp" #include "src/buildtool/execution_api/common/execution_api.hpp" #include "src/buildtool/execution_api/local/config.hpp" @@ -38,6 +39,7 @@ struct ApiBundle final { gsl::not_null<LocalExecutionConfig const*> const& local_exec_config, RepositoryConfig const* repo_config, gsl::not_null<Auth const*> const& authentication, + gsl::not_null<RetryConfig const*> const& retry_config, gsl::not_null<RemoteExecutionConfig const*> const& remote_exec_config); [[nodiscard]] auto CreateRemote(std::optional<ServerAddress> const& address) @@ -45,7 +47,8 @@ struct ApiBundle final { gsl::not_null<IExecutionApi::Ptr> const local; // needed by remote Auth const& auth; // needed by remote - RemoteExecutionConfig const& remote_config; // needed by remote + RetryConfig const& retry_config; // needed by remote + RemoteExecutionConfig const& remote_config; gsl::not_null<IExecutionApi::Ptr> const remote; }; |