summaryrefslogtreecommitdiff
path: root/src/other_tools
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2025-02-14 15:16:10 +0100
committerMaksim Denisov <denisov.maksim@huawei.com>2025-02-19 17:50:30 +0100
commit8ab573ef1c624e2ed81b2032178c25451176d2f1 (patch)
treeb3e41ee30eed3240bcd18502b7972903e7c2a53e /src/other_tools
parentdfa481bd5f97d92c444dc31a4a051cb890494d1d (diff)
downloadjustbuild-8ab573ef1c624e2ed81b2032178c25451176d2f1.tar.gz
ApiBundle: Remove HashFunction.
And ensure every user obtains HashFunction from corresponding IExecutionApi
Diffstat (limited to 'src/other_tools')
-rw-r--r--src/other_tools/just_mr/fetch.cpp12
-rw-r--r--src/other_tools/just_mr/setup.cpp12
2 files changed, 12 insertions, 12 deletions
diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp
index 03813b13..7fafada8 100644
--- a/src/other_tools/just_mr/fetch.cpp
+++ b/src/other_tools/just_mr/fetch.cpp
@@ -411,12 +411,13 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config,
}
// create the remote api
- auto const hash_fct =
- compat_local_context != nullptr
- ? compat_local_context->storage_config->hash_function
- : native_local_context.storage_config->hash_function;
IExecutionApi::Ptr remote_api = nullptr;
if (auto const address = remote_exec_config->remote_address) {
+ auto const hash_fct =
+ compat_local_context != nullptr
+ ? compat_local_context->storage_config->hash_function
+ : native_local_context.storage_config->hash_function;
+
ExecutionConfiguration config;
config.skip_cache_lookup = false;
remote_api = std::make_shared<BazelApi>("remote-execution",
@@ -441,8 +442,7 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config,
return kExitConfigError;
}
auto const apis =
- ApiBundle{.hash_function = hash_fct,
- .local = mr_local_api,
+ ApiBundle{.local = mr_local_api,
.remote = has_remote_api ? remote_api : mr_local_api};
auto serve = ServeApi::Create(
*serve_config,
diff --git a/src/other_tools/just_mr/setup.cpp b/src/other_tools/just_mr/setup.cpp
index 427c3288..b4b31f71 100644
--- a/src/other_tools/just_mr/setup.cpp
+++ b/src/other_tools/just_mr/setup.cpp
@@ -219,12 +219,13 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config,
}
// create the remote api
- auto const hash_fct =
- compat_local_context != nullptr
- ? compat_local_context->storage_config->hash_function
- : native_local_context.storage_config->hash_function;
IExecutionApi::Ptr remote_api = nullptr;
if (auto const address = remote_exec_config->remote_address) {
+ auto const hash_fct =
+ compat_local_context != nullptr
+ ? compat_local_context->storage_config->hash_function
+ : native_local_context.storage_config->hash_function;
+
ExecutionConfiguration config;
config.skip_cache_lookup = false;
remote_api = std::make_shared<BazelApi>("remote-execution",
@@ -249,8 +250,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config,
return std::nullopt;
}
auto const apis =
- ApiBundle{.hash_function = hash_fct,
- .local = mr_local_api,
+ ApiBundle{.local = mr_local_api,
.remote = has_remote_api ? remote_api : mr_local_api};
auto serve = ServeApi::Create(
*serve_config,