From 8ab573ef1c624e2ed81b2032178c25451176d2f1 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 14 Feb 2025 15:16:10 +0100 Subject: ApiBundle: Remove HashFunction. And ensure every user obtains HashFunction from corresponding IExecutionApi --- src/other_tools/just_mr/fetch.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/other_tools/just_mr/fetch.cpp') 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 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("remote-execution", @@ -441,8 +442,7 @@ auto MultiRepoFetch(std::shared_ptr 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, -- cgit v1.2.3