diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2025-02-21 16:18:47 +0100 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2025-02-27 09:03:30 +0100 |
commit | a8a167cb206f6c66e52ab4e92e0939e91b8dfed8 (patch) | |
tree | 7861406725739f45a98c1312ed45264bb10b9b35 /src/buildtool/execution_api/remote/bazel/bazel_api.cpp | |
parent | e1880bead60d433de2960104bd62cd9e27bfca17 (diff) | |
download | justbuild-a8a167cb206f6c66e52ab4e92e0939e91b8dfed8.tar.gz |
ArtifactBlob: Convert to a class
Diffstat (limited to 'src/buildtool/execution_api/remote/bazel/bazel_api.cpp')
-rw-r--r-- | src/buildtool/execution_api/remote/bazel/bazel_api.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp index 39000194..ea6b71b9 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp @@ -73,9 +73,9 @@ namespace { return false; } for (auto& blob : blobs) { - auto const info = back_map->GetReference(blob.digest); - blob.is_exec = - info.has_value() and IsExecutableObject(info.value()->type); + auto const info = back_map->GetReference(blob.GetDigest()); + blob.SetExecutable(info.has_value() and + IsExecutableObject(info.value()->type)); // Collect blob and upload to other CAS if transfer size reached. if (not UpdateContainerAndUpload( &container, @@ -239,7 +239,7 @@ auto BazelApi::CreateAction( auto const& type = artifacts_info[gpos].type; if (not FileSystemManager::WriteFileAs</*kSetEpochTime=*/true, /*kSetWritable=*/true>( - *blobs[pos].data, output_paths[gpos], type)) { + *blobs[pos].ReadContent(), output_paths[gpos], type)) { Logger::Log(LogLevel::Warning, "staging to output path {} failed.", output_paths[gpos].string()); @@ -486,7 +486,7 @@ auto BazelApi::CreateAction( -> std::optional<std::string> { auto reader = network_->CreateReader(); if (auto blob = reader.ReadSingleBlob(artifact_info.digest)) { - return *blob->data; + return *blob->ReadContent(); } return std::nullopt; } @@ -520,7 +520,7 @@ auto BazelApi::CreateAction( targets->reserve(digests.size()); for (auto blobs : reader.ReadIncrementally(&digests)) { for (auto const& blob : blobs) { - targets->emplace_back(*blob.data); + targets->emplace_back(*blob.ReadContent()); } } }); |