summaryrefslogtreecommitdiff
path: root/src/other_tools/root_maps/commit_git_map.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-02-21 12:08:34 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-02-27 14:35:44 +0100
commit1394c3d9016373ef727feac9d1aed514e1f89f53 (patch)
tree8a1e0071a9233b6bc68990c58481db3b0fc1597a /src/other_tools/root_maps/commit_git_map.cpp
parent4500ab06bc8891aa1ba6cf00f1437fe466315624 (diff)
downloadjustbuild-1394c3d9016373ef727feac9d1aed514e1f89f53.tar.gz
just-mr: Correct handling of remotes with respect to compatibility mode
In order to set up roots, just-mr is able to interrogate, if given, serve and/or remote-execution endpoints. However, just-mr operates only with Git hashes, i.e., with a native mode CAS. This commit ensures the correct interactions occur between just-mr and the provided endpoints not only in native mode, but also in comaptible mode, where a serve endpoint might be present even if one cannot make use of its associated remote-exection endpoint. The user always gets informed if any incompatibilities are detected.
Diffstat (limited to 'src/other_tools/root_maps/commit_git_map.cpp')
-rw-r--r--src/other_tools/root_maps/commit_git_map.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/other_tools/root_maps/commit_git_map.cpp b/src/other_tools/root_maps/commit_git_map.cpp
index 04f14023..d97f33be 100644
--- a/src/other_tools/root_maps/commit_git_map.cpp
+++ b/src/other_tools/root_maps/commit_git_map.cpp
@@ -108,6 +108,15 @@ void EnsureRootAsAbsent(
/*fatal=*/true);
return;
}
+ if (not remote_api) {
+ (*logger)(
+ fmt::format("Missing or incompatible remote-execution "
+ "endpoint needed to sync workspace root {} "
+ "with the serve endpoint.",
+ tree_id),
+ /*fatal=*/true);
+ return;
+ }
// the tree is known locally, so we can upload it to remote CAS
// for the serve endpoint to retrieve it and set up the root
if (not EnsureAbsentRootOnServe(tree_id,