diff options
Diffstat (limited to 'src/buildtool/execution_api/execution_service')
3 files changed, 16 insertions, 11 deletions
diff --git a/src/buildtool/execution_api/execution_service/bytestream_server.cpp b/src/buildtool/execution_api/execution_service/bytestream_server.cpp index 32adba91..0f77542d 100644 --- a/src/buildtool/execution_api/execution_service/bytestream_server.cpp +++ b/src/buildtool/execution_api/execution_service/bytestream_server.cpp @@ -73,12 +73,11 @@ auto BytestreamServiceImpl::Read( if (NativeSupport::IsTree(*hash)) { ArtifactDigest dgst{NativeSupport::Unprefix(*hash), 0, true}; - path = storage_.CAS().TreePath(static_cast<bazel_re::Digest>(dgst)); + path = storage_.CAS().TreePath(dgst); } else { ArtifactDigest dgst{NativeSupport::Unprefix(*hash), 0, false}; - path = - storage_.CAS().BlobPath(static_cast<bazel_re::Digest>(dgst), false); + path = storage_.CAS().BlobPath(dgst, false); } if (not path) { auto str = fmt::format("could not find {}", *hash); diff --git a/src/buildtool/execution_api/execution_service/cas_utils.cpp b/src/buildtool/execution_api/execution_service/cas_utils.cpp index 592cd6ce..e92a2239 100644 --- a/src/buildtool/execution_api/execution_service/cas_utils.cpp +++ b/src/buildtool/execution_api/execution_service/cas_utils.cpp @@ -50,9 +50,11 @@ auto CASUtils::SplitBlobIdentity(bazel_re::Digest const& blob_digest, -> expected<std::vector<bazel_re::Digest>, grpc::Status> { // Check blob existence. - auto path = NativeSupport::IsTree(blob_digest.hash()) - ? storage.CAS().TreePath(blob_digest) - : storage.CAS().BlobPath(blob_digest, false); + auto path = + NativeSupport::IsTree(blob_digest.hash()) + ? storage.CAS().TreePath(static_cast<ArtifactDigest>(blob_digest)) + : storage.CAS().BlobPath(static_cast<ArtifactDigest>(blob_digest), + false); if (not path) { return unexpected{ grpc::Status{grpc::StatusCode::NOT_FOUND, diff --git a/src/buildtool/execution_api/execution_service/execution_server.cpp b/src/buildtool/execution_api/execution_service/execution_server.cpp index 16202975..b862a03d 100644 --- a/src/buildtool/execution_api/execution_service/execution_server.cpp +++ b/src/buildtool/execution_api/execution_service/execution_server.cpp @@ -378,8 +378,8 @@ namespace { if (auto error_msg = IsAHash(request.action_digest().hash())) { return unexpected{std::move(*error_msg)}; } - auto const action_path = - storage.CAS().BlobPath(request.action_digest(), false); + auto const action_path = storage.CAS().BlobPath( + static_cast<ArtifactDigest>(request.action_digest()), false); if (not action_path) { return unexpected{fmt::format("could not retrieve blob {} from cas", request.action_digest().hash())}; @@ -395,8 +395,11 @@ namespace { } auto const input_root_path = Compatibility::IsCompatible() - ? storage.CAS().BlobPath(action.input_root_digest(), false) - : storage.CAS().TreePath(action.input_root_digest()); + ? storage.CAS().BlobPath( + static_cast<ArtifactDigest>(action.input_root_digest()), + false) + : storage.CAS().TreePath( + static_cast<ArtifactDigest>(action.input_root_digest())); if (not input_root_path) { return unexpected{ @@ -412,7 +415,8 @@ namespace { if (auto error_msg = IsAHash(action.command_digest().hash())) { return unexpected{*std::move(error_msg)}; } - auto path = storage.CAS().BlobPath(action.command_digest(), false); + auto path = storage.CAS().BlobPath( + static_cast<ArtifactDigest>(action.command_digest()), false); if (not path) { return unexpected{fmt::format("Could not retrieve blob {} from cas", action.command_digest().hash())}; |