From 4041004cf747d97d71dce04c5f5e2eacdf74b200 Mon Sep 17 00:00:00 2001 From: Chojan Shang Date: Tue, 26 Oct 2021 11:18:51 +0800 Subject: [PATCH 1/3] Bump deps Signed-off-by: Chojan Shang --- arrow-flight/Cargo.toml | 10 +++++----- arrow-flight/src/arrow.flight.protocol.rs | 11 ++--------- integration-testing/Cargo.toml | 6 +++--- .../src/flight_server_scenarios/auth_basic_proto.rs | 6 ++++-- 4 files changed, 14 insertions(+), 19 deletions(-) diff --git a/arrow-flight/Cargo.toml b/arrow-flight/Cargo.toml index 4b50f4e5b9e9..baf95c29bfe2 100644 --- a/arrow-flight/Cargo.toml +++ b/arrow-flight/Cargo.toml @@ -28,20 +28,20 @@ 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" +proc-macro2 = "=1.0.30" #[lib] #name = "flight" 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 7ee23a910f96..6ca01ec3e785 100644 --- a/integration-testing/Cargo.toml +++ b/integration-testing/Cargo.toml @@ -36,10 +36,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" -tracing-subscriber = { version = "0.2.15", optional = true } +tonic = "0.6" +tracing-subscriber = { version = "0.3.1", 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..b6c11dc8e1a5 100644 --- a/integration-testing/src/flight_server_scenarios/auth_basic_proto.rs +++ b/integration-testing/src/flight_server_scenarios/auth_basic_proto.rs @@ -191,7 +191,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 +220,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")) } } From a545a7beac84bd329d528d99bbee6c296abbabef Mon Sep 17 00:00:00 2001 From: Chojan Shang Date: Tue, 26 Oct 2021 11:29:17 +0800 Subject: [PATCH 2/3] Setup lastest cargo-tarpaulin Signed-off-by: Chojan Shang --- .github/workflows/rust.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 631763994a82..8299e4d024f1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -286,10 +286,8 @@ jobs: export ARROW_TEST_DATA=$(pwd)/testing/data export PARQUET_TEST_DATA=$(pwd)/parquet-testing/data - - # 2020-11-15: There is a cargo-tarpaulin regression in 0.17.0 - # see https://github.com/xd009642/tarpaulin/issues/618 - cargo install --version 0.16.0 cargo-tarpaulin + + cargo install cargo-tarpaulin cargo tarpaulin --out Xml - name: Report coverage continue-on-error: true From 8e3003ff1156f98e915f8cab46331cb0bbee2df5 Mon Sep 17 00:00:00 2001 From: Chojan Shang Date: Tue, 26 Oct 2021 15:39:08 +0800 Subject: [PATCH 3/3] Try to use the lastest cargo Signed-off-by: Chojan Shang --- .github/workflows/rust.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8299e4d024f1..ad6e35051ad8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -267,6 +267,11 @@ jobs: - uses: actions/checkout@v2 with: submodules: true + - name: Setup Rust toolchain + run: | + rustup toolchain install ${{ matrix.rust }} + rustup default ${{ matrix.rust }} + rustup component add rustfmt clippy - name: Cache Cargo uses: actions/cache@v2 with: