diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-10-24 11:21:23 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-10-25 13:00:43 +0200 |
commit | b98addc8f8e3e62e1213cd967f20aa631057f84e (patch) | |
tree | d4e7399fc4a02fa4e0e0684a1cdfa2bfa35673c3 /src/other_tools/just_mr/fetch.cpp | |
parent | 4018960c59d3fd0702c714e404ac913b2e83c3f5 (diff) | |
download | justbuild-b98addc8f8e3e62e1213cd967f20aa631057f84e.tar.gz |
serve service: Respond with digest for blob and tree checks
...to be able to interrogate remotes irrespective of protocol.
When serve endpoint is active, it will provide the correct digest
with which to interrogate the remote endpoint. Otherwise, for a
compatible remote check the file mappings for the correct digest.
The serve service proto file is updated accordingly.
Diffstat (limited to 'src/other_tools/just_mr/fetch.cpp')
-rw-r--r-- | src/other_tools/just_mr/fetch.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp index ace8cbda..fdea8812 100644 --- a/src/other_tools/just_mr/fetch.cpp +++ b/src/other_tools/just_mr/fetch.cpp @@ -464,18 +464,20 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config, auto crit_git_op_ptr = std::make_shared<CriticalGitOpGuard>(); auto critical_git_op_map = CreateCriticalGitOpMap(crit_git_op_ptr); - auto content_cas_map = - CreateContentCASMap(common_args.just_mr_paths, - common_args.alternative_mirrors, - common_args.ca_info, - &critical_git_op_map, - serve ? &*serve : nullptr, - &native_storage_config, - &native_storage, - &(*apis.local), - has_remote_api ? &*apis.remote : nullptr, - &progress, - common_args.jobs); + auto content_cas_map = CreateContentCASMap( + common_args.just_mr_paths, + common_args.alternative_mirrors, + common_args.ca_info, + &critical_git_op_map, + serve ? &*serve : nullptr, + &native_storage_config, + compat_storage_config != nullptr ? &*compat_storage_config : nullptr, + &native_storage, + compat_storage != nullptr ? &*compat_storage : nullptr, + &(*apis.local), + has_remote_api ? &*apis.remote : nullptr, + &progress, + common_args.jobs); auto archive_fetch_map = CreateArchiveFetchMap( &content_cas_map, |