summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr/fetch.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-11-20 14:20:06 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-11-21 10:21:29 +0100
commita8d02eac0e6673dea6daa781bf1c31921ec5f63a (patch)
tree6287ca40ee26228c89f9b6ca50e200762ae8b759 /src/other_tools/just_mr/fetch.cpp
parent37968f38e8dc07a27941c52204692c6f3254c22a (diff)
downloadjustbuild-a8d02eac0e6673dea6daa781bf1c31921ec5f63a.tar.gz
content_cas_map: Interrogate just serve endpoint also if doing pure fetch
Before trying to fetch an archive content from other non-local sources, check first the just serve endpoint.
Diffstat (limited to 'src/other_tools/just_mr/fetch.cpp')
-rw-r--r--src/other_tools/just_mr/fetch.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp
index ade217f2..c4450c2a 100644
--- a/src/other_tools/just_mr/fetch.cpp
+++ b/src/other_tools/just_mr/fetch.cpp
@@ -274,11 +274,16 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config,
IExecutionApi::Ptr local_api{remote_api ? std::make_unique<LocalApi>()
: nullptr};
+ // setup the API for serving trees of Git repos or archives
+ auto serve_api_exists = JustMR::Utils::SetupServeApi(
+ common_args.remote_serve_address, auth_args);
+
// create async maps
auto content_cas_map =
CreateContentCASMap(common_args.just_mr_paths,
common_args.alternative_mirrors,
common_args.ca_info,
+ serve_api_exists,
local_api ? &(*local_api) : nullptr,
remote_api ? &(*remote_api) : nullptr,
common_args.jobs);