From 149fe52517653a3a5c2ef5f2be2ab09415eedba4 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Fri, 7 Oct 2022 16:26:51 +0200 Subject: Fix upload of known source trees When a tree is taken from a git root, it is not necessarily known on the remote site. So, as any missing artifact it has to be uploaded, recursively uploading the parts to keep the tree invariant. The function RetrieveToCas was doing the correct recursiv pattern, however inspecting trees incorrectly using the function ReadTreeInfos; the latter function, however, was obtaining all the leafs of the tree as is needed for a compatible action-input description. Add and use a function that reads the direct contents of a tree. --- src/buildtool/execution_api/local/local_api.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/buildtool/execution_api/local/local_api.hpp') diff --git a/src/buildtool/execution_api/local/local_api.hpp b/src/buildtool/execution_api/local/local_api.hpp index 13bcb7e3..dd3bc4a0 100644 --- a/src/buildtool/execution_api/local/local_api.hpp +++ b/src/buildtool/execution_api/local/local_api.hpp @@ -134,7 +134,7 @@ class LocalApi final : public IExecutionApi { for (auto const& info : missing_artifacts_info) { // Recursively process trees. if (IsTreeObject(info.type)) { - auto const& infos = storage_->ReadTreeInfos( + auto const& infos = storage_->ReadTreeInfosDirect( info.digest, std::filesystem::path{}); if (not infos or not RetrieveToCas(infos->second, api)) { return false; -- cgit v1.2.3