Skip to content

Commit

Permalink
Remove unused proto field (#1117)
Browse files Browse the repository at this point in the history
Removes unused proto field in worker api.
  • Loading branch information
allada committed Jul 9, 2024
1 parent 3070a40 commit 34dea06
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<execute_result::Result>,
Expand Down
1 change: 0 additions & 1 deletion nativelink-service/tests/worker_api_server_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ pub async fn execution_response_success_test() -> Result<(), Box<dyn std::error:
instance_name,
worker_id: test_context.worker_id.to_string(),
operation_id: expected_operation_id.to_string(),
digest_function: DigestHasherFunc::Sha256.proto_digest_func().into(),
result: Some(execute_result::Result::ExecuteResponse(
execute_response.clone(),
)),
Expand Down
2 changes: 0 additions & 2 deletions nativelink-worker/src/local_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,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::ExecuteResponse(action_stage.into())),
}
)
Expand All @@ -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")?;
},
Expand Down
3 changes: 0 additions & 3 deletions nativelink-worker/tests/local_worker_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -397,7 +396,6 @@ async fn simple_worker_start_action_test() -> Result<(), Box<dyn std::error::Err
worker_id: expected_worker_id,
instance_name: INSTANCE_NAME.to_string(),
operation_id: String::new(),
digest_function: digest_function::Value::Sha256.into(),
result: Some(execute_result::Result::ExecuteResponse(
ActionStage::Completed(action_result).into()
)),
Expand Down Expand Up @@ -621,7 +619,6 @@ async fn experimental_precondition_script_fails() -> Result<(), Box<dyn std::err
worker_id: expected_worker_id,
instance_name: INSTANCE_NAME.to_string(),
operation_id: String::new(),
digest_function: digest_function::Value::Sha256.into(),
result: Some(execute_result::Result::InternalError(
make_err!(Code::ResourceExhausted, "{}", EXPECTED_MSG,).into()
)),
Expand Down

0 comments on commit 34dea06

Please sign in to comment.