Skip to content

Commit

Permalink
Bump Rust dependencies (#1319)
Browse files Browse the repository at this point in the history
  • Loading branch information
blakehatch authored Sep 4, 2024
1 parent ca88d90 commit 34db1b8
Show file tree
Hide file tree
Showing 11 changed files with 277 additions and 346 deletions.
311 changes: 163 additions & 148 deletions Cargo.lock

Large diffs are not rendered by default.

154 changes: 55 additions & 99 deletions nativelink-proto/genproto/build.bazel.remote.execution.v2.pb.rs

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion nativelink-proto/genproto/build.bazel.semver.pb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

// This file is @generated by prost-build.
/// The full version of a given tool.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SemVer {
/// The major version, e.g 10 for 10.2.3.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@

// This file is @generated by prost-build.
/// / Request object for keep alive requests.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeepAliveRequest {
/// / ID of the worker making the request.
#[prost(string, tag = "1")]
pub worker_id: ::prost::alloc::string::String,
}
/// / Request object for going away requests.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GoingAwayRequest {
/// / ID of the worker making the request.
Expand All @@ -31,7 +29,6 @@ pub struct GoingAwayRequest {
}
/// / Represents the initial request sent to the scheduler informing the
/// / scheduler about this worker's capabilities.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SupportedProperties {
/// / The list of properties this worker can support. The exact
Expand All @@ -50,7 +47,6 @@ pub struct SupportedProperties {
>,
}
/// / The result of an ExecutionRequest.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteResult {
/// / ID of the worker making the request.
Expand All @@ -70,7 +66,6 @@ pub struct ExecuteResult {
/// Nested message and enum types in `ExecuteResult`.
pub mod execute_result {
/// / The actual response data.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Result {
/// / Result of the execution. See `build.bazel.remote.execution.v2.ExecuteResponse`
Expand All @@ -87,31 +82,27 @@ pub mod execute_result {
}
}
/// / Result sent back from the server when a node connects.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectionResult {
/// / The internal ID given to the newly connected node.
#[prost(string, tag = "1")]
pub worker_id: ::prost::alloc::string::String,
}
/// / Request to kill a running operation sent from the scheduler to a worker.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KillOperationRequest {
/// / The the operation id for the operation to be killed.
#[prost(string, tag = "1")]
pub operation_id: ::prost::alloc::string::String,
}
/// / Communication from the scheduler to the worker.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateForWorker {
#[prost(oneof = "update_for_worker::Update", tags = "1, 2, 3, 4, 5")]
pub update: ::core::option::Option<update_for_worker::Update>,
}
/// Nested message and enum types in `UpdateForWorker`.
pub mod update_for_worker {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Update {
/// / This will be sent only as the first item in the stream after the node
Expand All @@ -138,7 +129,6 @@ pub mod update_for_worker {
KillOperationRequest(super::KillOperationRequest),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartExecute {
/// / The action information used to execute job.
Expand All @@ -158,7 +148,6 @@ pub struct StartExecute {
/// / by programs like bb_browswer to inspect the history of a build.
/// / Note: Ensure this is always compatible with:
/// / <https://github.com/buildbarn/bb-remote-execution/blob/e95e066eb624dc9099682394ec18c12e218e8fc4/pkg/proto/cas/cas.proto#L23>
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalExecuteResponse {
#[prost(message, optional, tag = "1")]
Expand Down Expand Up @@ -190,8 +179,8 @@ pub mod worker_api_client {
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Expand All @@ -216,7 +205,7 @@ pub mod worker_api_client {
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
WorkerApiClient::new(InterceptedService::new(inner, interceptor))
}
Expand Down Expand Up @@ -391,12 +380,12 @@ pub mod worker_api_server {
use tonic::codegen::*;
/// Generated trait containing gRPC methods that should be implemented for use with WorkerApiServer.
#[async_trait]
pub trait WorkerApi: Send + Sync + 'static {
pub trait WorkerApi: std::marker::Send + std::marker::Sync + 'static {
/// Server streaming response type for the ConnectWorker method.
type ConnectWorkerStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<super::UpdateForWorker, tonic::Status>,
>
+ Send
+ std::marker::Send
+ 'static;
/// / Registers this worker and informs the scheduler what properties
/// / this worker supports. The response must be listened on the client
Expand Down Expand Up @@ -447,14 +436,14 @@ pub mod worker_api_server {
/// / command to the scheduler. The scheduler will then use this information
/// / to determine which jobs the worker can process.
#[derive(Debug)]
pub struct WorkerApiServer<T: WorkerApi> {
pub struct WorkerApiServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T: WorkerApi> WorkerApiServer<T> {
impl<T> WorkerApiServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
Expand Down Expand Up @@ -508,8 +497,8 @@ pub mod worker_api_server {
impl<T, B> tonic::codegen::Service<http::Request<B>> for WorkerApiServer<T>
where
T: WorkerApi,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
Expand Down Expand Up @@ -719,7 +708,7 @@ pub mod worker_api_server {
}
}
}
impl<T: WorkerApi> Clone for WorkerApiServer<T> {
impl<T> Clone for WorkerApiServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
Expand All @@ -731,7 +720,9 @@ pub mod worker_api_server {
}
}
}
impl<T: WorkerApi> tonic::server::NamedService for WorkerApiServer<T> {
const NAME: &'static str = "com.github.trace_machina.nativelink.remote_execution.WorkerApi";
/// Generated gRPC service name
pub const SERVICE_NAME: &str = "com.github.trace_machina.nativelink.remote_execution.WorkerApi";
impl<T> tonic::server::NamedService for WorkerApiServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
4 changes: 0 additions & 4 deletions nativelink-proto/genproto/google.api.pb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
/// Defines the HTTP configuration for an API service. It contains a list of
/// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
/// to one or more HTTP REST API methods.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Http {
/// A list of HTTP configuration rules that apply to individual API methods.
Expand Down Expand Up @@ -315,7 +314,6 @@ pub struct Http {
/// If an API needs to use a JSON array for request or response body, it can map
/// the request or response body to a repeated field. However, some gRPC
/// Transcoding implementations may not support this feature.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpRule {
/// Selects a method to which this rule applies.
Expand Down Expand Up @@ -355,7 +353,6 @@ pub mod http_rule {
/// Determines the URL pattern is matched by this rules. This pattern can be
/// used with any of the {get|put|post|delete|patch} methods. A custom method
/// can be defined using the 'custom' field.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Pattern {
/// Maps to HTTP GET. Used for listing and getting information about
Expand Down Expand Up @@ -383,7 +380,6 @@ pub mod http_rule {
}
}
/// A custom pattern is used for defining custom HTTP verb.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomHttpPattern {
/// The name of this custom HTTP verb.
Expand Down
32 changes: 14 additions & 18 deletions nativelink-proto/genproto/google.bytestream.pb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

// This file is @generated by prost-build.
/// Request object for ByteStream.Read.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadRequest {
/// The name of the resource to read.
Expand All @@ -38,7 +37,6 @@ pub struct ReadRequest {
pub read_limit: i64,
}
/// Response object for ByteStream.Read.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadResponse {
/// A portion of the data for the resource. The service **may** leave `data`
Expand All @@ -49,7 +47,6 @@ pub struct ReadResponse {
pub data: ::prost::bytes::Bytes,
}
/// Request object for ByteStream.Write.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteRequest {
/// The name of the resource to write. This **must** be set on the first
Expand Down Expand Up @@ -84,23 +81,20 @@ pub struct WriteRequest {
pub data: ::prost::bytes::Bytes,
}
/// Response object for ByteStream.Write.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WriteResponse {
/// The number of bytes that have been processed for the given resource.
#[prost(int64, tag = "1")]
pub committed_size: i64,
}
/// Request object for ByteStream.QueryWriteStatus.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryWriteStatusRequest {
/// The name of the resource whose write status is being requested.
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
/// Response object for ByteStream.QueryWriteStatus.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryWriteStatusResponse {
/// The number of bytes that have been processed for the given resource.
Expand Down Expand Up @@ -147,8 +141,8 @@ pub mod byte_stream_client {
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Expand All @@ -173,7 +167,7 @@ pub mod byte_stream_client {
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
ByteStreamClient::new(InterceptedService::new(inner, interceptor))
}
Expand Down Expand Up @@ -329,12 +323,12 @@ pub mod byte_stream_server {
use tonic::codegen::*;
/// Generated trait containing gRPC methods that should be implemented for use with ByteStreamServer.
#[async_trait]
pub trait ByteStream: Send + Sync + 'static {
pub trait ByteStream: std::marker::Send + std::marker::Sync + 'static {
/// Server streaming response type for the Read method.
type ReadStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<super::ReadResponse, tonic::Status>,
>
+ Send
+ std::marker::Send
+ 'static;
/// `Read()` is used to retrieve the contents of a resource as a sequence
/// of bytes. The bytes are returned in a sequence of responses, and the
Expand Down Expand Up @@ -415,14 +409,14 @@ pub mod byte_stream_server {
///
/// The errors returned by the service are in the Google canonical error space.
#[derive(Debug)]
pub struct ByteStreamServer<T: ByteStream> {
pub struct ByteStreamServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T: ByteStream> ByteStreamServer<T> {
impl<T> ByteStreamServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
Expand Down Expand Up @@ -476,8 +470,8 @@ pub mod byte_stream_server {
impl<T, B> tonic::codegen::Service<http::Request<B>> for ByteStreamServer<T>
where
T: ByteStream,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
Expand Down Expand Up @@ -646,7 +640,7 @@ pub mod byte_stream_server {
}
}
}
impl<T: ByteStream> Clone for ByteStreamServer<T> {
impl<T> Clone for ByteStreamServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
Expand All @@ -658,7 +652,9 @@ pub mod byte_stream_server {
}
}
}
impl<T: ByteStream> tonic::server::NamedService for ByteStreamServer<T> {
const NAME: &'static str = "google.bytestream.ByteStream";
/// Generated gRPC service name
pub const SERVICE_NAME: &str = "google.bytestream.ByteStream";
impl<T> tonic::server::NamedService for ByteStreamServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
Loading

0 comments on commit 34db1b8

Please sign in to comment.