From 9b5ea1ef011bbd03def3c6c112446c73072e9de8 Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies Date: Mon, 1 Nov 2021 09:46:55 +0000 Subject: [PATCH] Upgrade prost and tonic --- arrow-flight/Cargo.toml | 8 ++++---- arrow-flight/src/arrow.flight.protocol.rs | 11 ++--------- integration-testing/Cargo.toml | 4 ++-- .../src/flight_server_scenarios/auth_basic_proto.rs | 9 ++++++--- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/arrow-flight/Cargo.toml b/arrow-flight/Cargo.toml index 856ea3b160f7..2cd024b52ea4 100644 --- a/arrow-flight/Cargo.toml +++ b/arrow-flight/Cargo.toml @@ -29,17 +29,17 @@ license = "Apache-2.0" [dependencies] arrow = { path = "../arrow", version = "7.0.0-SNAPSHOT" } base64 = "0.13" -tonic = "0.5" +tonic = "0.6" bytes = "1" -prost = "0.8" -prost-derive = "0.8" +prost = "0.9" +prost-derive = "0.9" tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread"] } [dev-dependencies] futures = { version = "0.3", default-features = false, features = ["alloc"]} [build-dependencies] -tonic-build = "0.5" +tonic-build = "0.6" # Pin specific version of the tonic-build dependencies to avoid auto-generated # (and checked in) arrow.flight.protocol.rs from changing proc-macro2 = "=1.0.27" diff --git a/arrow-flight/src/arrow.flight.protocol.rs b/arrow-flight/src/arrow.flight.protocol.rs index b1a79ee72031..5775c0177590 100644 --- a/arrow-flight/src/arrow.flight.protocol.rs +++ b/arrow-flight/src/arrow.flight.protocol.rs @@ -229,7 +229,7 @@ pub mod flight_service_client { impl FlightServiceClient where T: tonic::client::GrpcService, - T::ResponseBody: Body + Send + Sync + 'static, + T::ResponseBody: Body + Send + 'static, T::Error: Into, ::Error: Into + Send, { @@ -513,7 +513,6 @@ pub mod flight_service_server { #[doc = "Server streaming response type for the Handshake method."] type HandshakeStream: futures_core::Stream> + Send - + Sync + 'static; #[doc = ""] #[doc = " Handshake between client and server. Depending on the server, the"] @@ -527,7 +526,6 @@ pub mod flight_service_server { #[doc = "Server streaming response type for the ListFlights method."] type ListFlightsStream: futures_core::Stream> + Send - + Sync + 'static; #[doc = ""] #[doc = " Get a list of available streams given a particular criteria. Most flight"] @@ -567,7 +565,6 @@ pub mod flight_service_server { #[doc = "Server streaming response type for the DoGet method."] type DoGetStream: futures_core::Stream> + Send - + Sync + 'static; #[doc = ""] #[doc = " Retrieve a single stream associated with a particular descriptor"] @@ -581,7 +578,6 @@ pub mod flight_service_server { #[doc = "Server streaming response type for the DoPut method."] type DoPutStream: futures_core::Stream> + Send - + Sync + 'static; #[doc = ""] #[doc = " Push a stream to the flight service associated with a particular"] @@ -597,7 +593,6 @@ pub mod flight_service_server { #[doc = "Server streaming response type for the DoExchange method."] type DoExchangeStream: futures_core::Stream> + Send - + Sync + 'static; #[doc = ""] #[doc = " Open a bidirectional data channel for a given descriptor. This"] @@ -612,7 +607,6 @@ pub mod flight_service_server { #[doc = "Server streaming response type for the DoAction method."] type DoActionStream: futures_core::Stream> + Send - + Sync + 'static; #[doc = ""] #[doc = " Flight services can support an arbitrary number of simple actions in"] @@ -628,7 +622,6 @@ pub mod flight_service_server { #[doc = "Server streaming response type for the ListActions method."] type ListActionsStream: futures_core::Stream> + Send - + Sync + 'static; #[doc = ""] #[doc = " A flight service exposes all of the available action types that it has"] @@ -674,7 +667,7 @@ pub mod flight_service_server { impl tonic::codegen::Service> for FlightServiceServer where T: FlightService, - B: Body + Send + Sync + 'static, + B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; diff --git a/integration-testing/Cargo.toml b/integration-testing/Cargo.toml index 98a4ed6d8ba4..1384eb3ef2f1 100644 --- a/integration-testing/Cargo.toml +++ b/integration-testing/Cargo.toml @@ -37,10 +37,10 @@ async-trait = "0.1.41" clap = "2.33" futures = "0.3" hex = "0.4" -prost = "0.8" +prost = "0.9" serde = { version = "1.0", features = ["rc"] } serde_derive = "1.0" serde_json = { version = "1.0", features = ["preserve_order"] } tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread"] } -tonic = "0.5" +tonic = "0.6" tracing-subscriber = { version = "0.2.15", optional = true } diff --git a/integration-testing/src/flight_server_scenarios/auth_basic_proto.rs b/integration-testing/src/flight_server_scenarios/auth_basic_proto.rs index ea7ad3c3385c..1426f2a051f5 100644 --- a/integration-testing/src/flight_server_scenarios/auth_basic_proto.rs +++ b/integration-testing/src/flight_server_scenarios/auth_basic_proto.rs @@ -110,7 +110,8 @@ impl FlightService for AuthBasicProtoScenarioImpl { &self, request: Request, ) -> Result, Status> { - self.check_auth(request.metadata()).await?; + let metadata = request.metadata(); + self.check_auth(metadata).await?; Err(Status::unimplemented("Not yet implemented")) } @@ -191,7 +192,8 @@ impl FlightService for AuthBasicProtoScenarioImpl { &self, request: Request>, ) -> Result, Status> { - self.check_auth(request.metadata()).await?; + let metadata = request.metadata(); + self.check_auth(metadata).await?; Err(Status::unimplemented("Not yet implemented")) } @@ -219,7 +221,8 @@ impl FlightService for AuthBasicProtoScenarioImpl { &self, request: Request>, ) -> Result, Status> { - self.check_auth(request.metadata()).await?; + let metadata = request.metadata(); + self.check_auth(metadata).await?; Err(Status::unimplemented("Not yet implemented")) } }