From 39b80d92da47fe0ff22b6c0dc8d872cbe7d53a21 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 12 Jul 2024 16:20:01 +0200 Subject: Use HashFunction from StorageConfig in ApiBundle --- src/buildtool/execution_api/common/api_bundle.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/buildtool/execution_api/common/api_bundle.cpp') diff --git a/src/buildtool/execution_api/common/api_bundle.cpp b/src/buildtool/execution_api/common/api_bundle.cpp index 2908fb47..6dea80ce 100644 --- a/src/buildtool/execution_api/common/api_bundle.cpp +++ b/src/buildtool/execution_api/common/api_bundle.cpp @@ -15,7 +15,6 @@ #include "src/buildtool/execution_api/common/api_bundle.hpp" #include "src/buildtool/common/remote/retry_config.hpp" -#include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/execution_api/bazel_msg/bazel_common.hpp" #include "src/buildtool/execution_api/local/local_api.hpp" #include "src/buildtool/execution_api/remote/bazel/bazel_api.hpp" @@ -28,13 +27,14 @@ ApiBundle::ApiBundle( gsl::not_null const& authentication, gsl::not_null const& retry_config, gsl::not_null const& remote_exec_config) - : local{std::make_shared(storage_config, + : auth{*authentication}, + retry_config{*retry_config}, + remote_config{*remote_exec_config}, + hash_function{storage_config->hash_function}, + local{std::make_shared(storage_config, storage, local_exec_config, - repo_config)}, // needed by remote - auth{*authentication}, // needed by remote - retry_config{*retry_config}, // needed by remote - remote_config{*remote_exec_config}, + repo_config)}, remote{CreateRemote(remote_exec_config->remote_address)} {} auto ApiBundle::CreateRemote(std::optional const& address) const @@ -48,7 +48,7 @@ auto ApiBundle::CreateRemote(std::optional const& address) const &auth, &retry_config, config, - HashFunction::Instance()); + hash_function); } return local; } -- cgit v1.2.3