From 4280b7a9bb6ce56b055fc9a0a9db40c7fd6e09ba Mon Sep 17 00:00:00 2001 From: Chethan Date: Mon, 30 Dec 2024 22:29:36 +0530 Subject: [PATCH] update success_rate proto file --- crates/external_services/src/grpc_client.rs | 1 + .../dynamic_routing/success_rate_client.rs | 3 ++- proto/success_rate.proto | 12 ++++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/crates/external_services/src/grpc_client.rs b/crates/external_services/src/grpc_client.rs index 40f2a535692b..7a627d3ab270 100644 --- a/crates/external_services/src/grpc_client.rs +++ b/crates/external_services/src/grpc_client.rs @@ -129,6 +129,7 @@ impl AddHeaders for tonic::Request { } } +#[cfg(feature = "dynamic_routing")] pub(crate) fn create_grpc_request(message: T, headers: GrpcHeaders) -> tonic::Request { let mut request = tonic::Request::new(message); request.add_headers_to_grpc_request(headers); diff --git a/crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs b/crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs index 852e850e4ff0..fca4ff61fcc5 100644 --- a/crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs +++ b/crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs @@ -16,7 +16,8 @@ pub use success_rate::{ missing_docs, unused_qualifications, clippy::unwrap_used, - clippy::as_conversions + clippy::as_conversions, + clippy::use_self )] pub mod success_rate { tonic::include_proto!("success_rate"); diff --git a/proto/success_rate.proto b/proto/success_rate.proto index 38e56e36c0ff..f49618bc4b6e 100644 --- a/proto/success_rate.proto +++ b/proto/success_rate.proto @@ -55,7 +55,11 @@ message CurrentBlockThreshold { } message UpdateSuccessRateWindowResponse { - string message = 1; + enum UpdationStatus { + WINDOW_UPDATION_SUCCEEDED = 0; + WINDOW_UPDATION_FAILED = 1; + } + UpdationStatus status = 1; } // API-3 types @@ -64,5 +68,9 @@ message InvalidateWindowsRequest { } message InvalidateWindowsResponse { - string message = 1; + enum InvalidationStatus { + WINDOW_INVALIDATION_SUCCEEDED = 0; + WINDOW_INVALIDATION_FAILED = 1; + } + InvalidationStatus status = 1; } \ No newline at end of file