From d2ebd1e083b56b7894b5056c25ba7485b3a116c5 Mon Sep 17 00:00:00 2001 From: Blaise Bruer Date: Mon, 8 Jul 2024 21:02:02 -0500 Subject: [PATCH] Remove unused proto field Removes unused proto field in worker api. --- .../nativelink/remote_execution/worker_api.proto | 11 ----------- ...trace_machina.nativelink.remote_execution.pb.rs | 14 -------------- nativelink-service/tests/worker_api_server_test.rs | 1 - nativelink-worker/src/local_worker.rs | 2 -- nativelink-worker/tests/local_worker_test.rs | 3 --- 5 files changed, 31 deletions(-) diff --git a/nativelink-proto/com/github/trace_machina/nativelink/remote_execution/worker_api.proto b/nativelink-proto/com/github/trace_machina/nativelink/remote_execution/worker_api.proto index ec3341f99..0005e7d0c 100644 --- a/nativelink-proto/com/github/trace_machina/nativelink/remote_execution/worker_api.proto +++ b/nativelink-proto/com/github/trace_machina/nativelink/remote_execution/worker_api.proto @@ -102,17 +102,6 @@ message ExecuteResult { /// The operation ID that was executed. string operation_id = 8; - // The digest function that was used to compute the action digest - // and all related blobs. - // - // If the digest function used is one of MD5, MURMUR3, SHA1, SHA256, - // SHA384, SHA512, or VSO, the client MAY leave this field unset. In - // that case the server SHOULD infer the digest function using the - // length of the action digest hash and the digest functions announced - // in the server's capabilities. - // TODO!!! THIS IS UNUSED AFAIK. - build.bazel.remote.execution.v2.DigestFunction.Value digest_function = 7; - /// The actual response data. oneof result { /// Result of the execution. See `build.bazel.remote.execution.v2.ExecuteResponse` diff --git a/nativelink-proto/genproto/com.github.trace_machina.nativelink.remote_execution.pb.rs b/nativelink-proto/genproto/com.github.trace_machina.nativelink.remote_execution.pb.rs index 19805abb4..ee6da601a 100644 --- a/nativelink-proto/genproto/com.github.trace_machina.nativelink.remote_execution.pb.rs +++ b/nativelink-proto/genproto/com.github.trace_machina.nativelink.remote_execution.pb.rs @@ -63,20 +63,6 @@ pub struct ExecuteResult { /// / The operation ID that was executed. #[prost(string, tag = "8")] pub operation_id: ::prost::alloc::string::String, - /// The digest function that was used to compute the action digest - /// and all related blobs. - /// - /// If the digest function used is one of MD5, MURMUR3, SHA1, SHA256, - /// SHA384, SHA512, or VSO, the client MAY leave this field unset. In - /// that case the server SHOULD infer the digest function using the - /// length of the action digest hash and the digest functions announced - /// in the server's capabilities. - /// TODO!!! THIS IS UNUSED AFAIK. - #[prost( - enumeration = "super::super::super::super::super::build::bazel::remote::execution::v2::digest_function::Value", - tag = "7" - )] - pub digest_function: i32, /// / The actual response data. #[prost(oneof = "execute_result::Result", tags = "4, 5")] pub result: ::core::option::Option, diff --git a/nativelink-service/tests/worker_api_server_test.rs b/nativelink-service/tests/worker_api_server_test.rs index 112c4d12e..745158465 100644 --- a/nativelink-service/tests/worker_api_server_test.rs +++ b/nativelink-service/tests/worker_api_server_test.rs @@ -474,7 +474,6 @@ pub async fn execution_response_success_test() -> Result<(), Box LocalWorkerImpl<'a, worker_id, instance_name, operation_id, - digest_function: digest_hasher.proto_digest_func().into(), result: Some(execute_result::Result::ExecuteResponse(action_stage.into())), } ) @@ -316,7 +315,6 @@ impl<'a, T: WorkerApiClientTrait, U: RunningActionsManager> LocalWorkerImpl<'a, worker_id, instance_name, operation_id, - digest_function: digest_hasher.proto_digest_func().into(), result: Some(execute_result::Result::InternalError(e.into())), }).await.err_tip(|| "Error calling execution_response with error")?; }, diff --git a/nativelink-worker/tests/local_worker_test.rs b/nativelink-worker/tests/local_worker_test.rs index a5da828e6..80c8c8482 100644 --- a/nativelink-worker/tests/local_worker_test.rs +++ b/nativelink-worker/tests/local_worker_test.rs @@ -32,7 +32,6 @@ mod utils { use nativelink_config::cas_server::{LocalWorkerConfig, WorkerProperty}; use nativelink_error::{make_err, make_input_err, Code, Error}; use nativelink_macro::nativelink_test; -use nativelink_proto::build::bazel::remote::execution::v2::digest_function; use nativelink_proto::build::bazel::remote::execution::v2::platform::Property; use nativelink_proto::com::github::trace_machina::nativelink::remote_execution::update_for_worker::Update; use nativelink_proto::com::github::trace_machina::nativelink::remote_execution::{ @@ -397,7 +396,6 @@ async fn simple_worker_start_action_test() -> Result<(), Box Result<(), Box