summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/execution_service
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2025-01-23 17:11:39 +0100
committerMaksim Denisov <denisov.maksim@huawei.com>2025-02-07 14:58:04 +0100
commit686a13142b816dfa334bb85f3ffdcc62a81a3bb4 (patch)
treef9296ee10f11b3528f5ef89f6bf544ff3182fdc4 /src/buildtool/execution_api/execution_service
parentb22ee0740857dad1f24999953864150a4f6bbcc8 (diff)
downloadjustbuild-686a13142b816dfa334bb85f3ffdcc62a81a3bb4.tar.gz
ByteStreamUtils: Use ArtifactDigest
Diffstat (limited to 'src/buildtool/execution_api/execution_service')
-rw-r--r--src/buildtool/execution_api/execution_service/TARGETS2
-rw-r--r--src/buildtool/execution_api/execution_service/bytestream_server.cpp10
2 files changed, 4 insertions, 8 deletions
diff --git a/src/buildtool/execution_api/execution_service/TARGETS b/src/buildtool/execution_api/execution_service/TARGETS
index 1e630d30..ce8704db 100644
--- a/src/buildtool/execution_api/execution_service/TARGETS
+++ b/src/buildtool/execution_api/execution_service/TARGETS
@@ -147,8 +147,6 @@
[ "cas_utils"
, ["@", "fmt", "", "fmt"]
, ["@", "protoc", "", "libprotobuf"]
- , ["src/buildtool/common", "artifact_digest_factory"]
- , ["src/buildtool/common", "bazel_types"]
, ["src/buildtool/common", "common"]
, ["src/buildtool/crypto", "hash_function"]
, ["src/buildtool/execution_api/common", "bytestream_utils"]
diff --git a/src/buildtool/execution_api/execution_service/bytestream_server.cpp b/src/buildtool/execution_api/execution_service/bytestream_server.cpp
index 802878a4..b4e1cb07 100644
--- a/src/buildtool/execution_api/execution_service/bytestream_server.cpp
+++ b/src/buildtool/execution_api/execution_service/bytestream_server.cpp
@@ -24,8 +24,6 @@
#include "fmt/core.h"
#include "google/protobuf/stubs/port.h"
#include "src/buildtool/common/artifact_digest.hpp"
-#include "src/buildtool/common/artifact_digest_factory.hpp"
-#include "src/buildtool/common/bazel_types.hpp"
#include "src/buildtool/crypto/hash_function.hpp"
#include "src/buildtool/execution_api/common/bytestream_utils.hpp"
#include "src/buildtool/execution_api/execution_service/cas_utils.hpp"
@@ -48,8 +46,8 @@ auto BytestreamServiceImpl::Read(
logger_.Emit(LogLevel::Error, "{}", str);
return ::grpc::Status{::grpc::StatusCode::INVALID_ARGUMENT, str};
}
- auto const read_digest = ArtifactDigestFactory::FromBazel(
- storage_config_.hash_function.GetType(), read_request->GetDigest());
+ auto const read_digest =
+ read_request->GetDigest(storage_config_.hash_function.GetType());
if (not read_digest) {
logger_.Emit(LogLevel::Debug, "{}", read_digest.error());
return ::grpc::Status{::grpc::StatusCode::INVALID_ARGUMENT,
@@ -115,8 +113,8 @@ auto BytestreamServiceImpl::Write(
return ::grpc::Status{::grpc::StatusCode::INVALID_ARGUMENT, str};
}
- auto const write_digest = ArtifactDigestFactory::FromBazel(
- storage_config_.hash_function.GetType(), write_request->GetDigest());
+ auto const write_digest =
+ write_request->GetDigest(storage_config_.hash_function.GetType());
if (not write_digest) {
logger_.Emit(LogLevel::Debug, "{}", write_digest.error());
return ::grpc::Status{::grpc::StatusCode::INVALID_ARGUMENT,