From b6c8e0192cf9a05d502e24727cfdb69afe2b314d Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 7 Mar 2024 12:51:15 +0100 Subject: distdir setup: do not ask remote-excution endpoint for tree Asking the remote-exeuction endpoint for the tree means, that, upon success, we fetch every archive from the remote execution endpoint, even those that we could get from a provided distdir. As our preference is to only use the network if necessary, simply use the standard way of creating a distdir: create it locally and for each file, try to get it from local resources first, then from the remote-execution endpoint, and finally from other network resources. --- src/other_tools/root_maps/distdir_git_map.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/other_tools/root_maps/distdir_git_map.cpp') diff --git a/src/other_tools/root_maps/distdir_git_map.cpp b/src/other_tools/root_maps/distdir_git_map.cpp index 2fc523f1..cc44c05c 100644 --- a/src/other_tools/root_maps/distdir_git_map.cpp +++ b/src/other_tools/root_maps/distdir_git_map.cpp @@ -515,21 +515,6 @@ auto CreateDistdirGitMap( } } } - // check the remote CAS for the tree - if (remote_api and - remote_api.value()->RetrieveToCas( - {Artifact::ObjectInfo{.digest = digest, - .type = ObjectType::Tree}}, - local_api)) { - ImportFromCASAndSetRoot(key, - distdir_tree_id_file, - import_to_git_map, - ts, - setter, - logger); - // done! - return; - } // we could not set the root as present using the CAS tree // invariant, so now we need to ensure we have all individual blobs -- cgit v1.2.3