From 95792fb717bd84d500037b62c77a4949274e670d Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Wed, 29 Jan 2025 09:46:58 +0100 Subject: Replace ArtifactBlobContainer and BazelBlobContainer ...with explicit std::unordered_set. --- src/buildtool/execution_api/common/common_api.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/buildtool/execution_api/common/common_api.cpp') diff --git a/src/buildtool/execution_api/common/common_api.cpp b/src/buildtool/execution_api/common/common_api.cpp index 41f71a07..8bd8f0e0 100644 --- a/src/buildtool/execution_api/common/common_api.cpp +++ b/src/buildtool/execution_api/common/common_api.cpp @@ -110,7 +110,7 @@ auto CommonUploadBlobTree(BlobTreePtr const& blob_tree, } // Process missing blobs. - ArtifactBlobContainer container; + std::unordered_set container; for (auto const& digest : missing_blobs_info->digests) { if (auto it = missing_blobs_info->back_map.find(digest); it != missing_blobs_info->back_map.end()) { @@ -127,7 +127,7 @@ auto CommonUploadBlobTree(BlobTreePtr const& blob_tree, &container, node->Blob(), /*exception_is_fatal=*/false, - [&api](ArtifactBlobContainer&& blobs) -> bool { + [&api](std::unordered_set&& blobs) -> bool { return api.Upload(std::move(blobs), /*skip_find_missing=*/true); })) { @@ -144,7 +144,7 @@ auto CommonUploadTreeCompatible( DirectoryTreePtr const& build_root, BazelMsgFactory::LinkDigestResolveFunc const& resolve_links) noexcept -> std::optional { - ArtifactBlobContainer blobs{}; + std::unordered_set blobs{}; // Store and upload blobs, taking into account the maximum transfer size. auto digest = BazelMsgFactory::CreateDirectoryDigestFromTree( build_root, resolve_links, [&blobs, &api](ArtifactBlob&& blob) { @@ -152,7 +152,7 @@ auto CommonUploadTreeCompatible( &blobs, std::move(blob), /*exception_is_fatal=*/false, - [&api](ArtifactBlobContainer&& container) -> bool { + [&api](std::unordered_set&& container) -> bool { return api.Upload(std::move(container), /*skip_find_missing=*/false); }); @@ -193,7 +193,7 @@ auto CommonUploadTreeNative(IExecutionApi const& api, "failed to upload blob tree for build root."); return std::nullopt; } - if (not api.Upload(ArtifactBlobContainer{{tree_blob}}, + if (not api.Upload({tree_blob}, /*skip_find_missing=*/true)) { Logger::Log(LogLevel::Debug, "failed to upload tree blob for build root."); -- cgit v1.2.3