From 012278f6e576658e8b87d532a0f10910f304ce44 Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Wed, 10 Jul 2024 16:20:32 +0800 Subject: [PATCH 1/2] bump to `hyper 1.0` ecosystem Signed-off-by: Bugen Zhao --- ginepro/Cargo.toml | 4 ++-- shared_proto/Cargo.toml | 6 +++--- tests/Cargo.toml | 6 +++--- tests/src/test_server.rs | 15 ++++++++------- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/ginepro/Cargo.toml b/ginepro/Cargo.toml index 8e60e66..2bfaf85 100644 --- a/ginepro/Cargo.toml +++ b/ginepro/Cargo.toml @@ -12,10 +12,10 @@ readme = "../README.md" [dependencies] anyhow = "1" async-trait = "0.1" -http = "0.2" +http = "1" thiserror = "1" tokio = { version = "1", features = ["full"] } -tonic = { version = ">=0.10,<0.12", features = ["tls"] } +tonic = { version = "0.12", features = ["tls"] } tower = { version = "0.4", default-features = false, features = ["discover"] } tracing = "0.1" trust-dns-resolver = "0.23" diff --git a/shared_proto/Cargo.toml b/shared_proto/Cargo.toml index f589e00..ee1e75f 100644 --- a/shared_proto/Cargo.toml +++ b/shared_proto/Cargo.toml @@ -6,8 +6,8 @@ edition = "2021" publish = false [dependencies] -prost = "0.12" -tonic = "0.11" +prost = "0.13" +tonic = "0.12" [build-dependencies] -tonic-build = "0.11" +tonic-build = "0.12" diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 3d9050d..53a2900 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -9,11 +9,11 @@ publish = false ginepro = { path = "../ginepro" } futures = "0.3" -hyper = "0.14" +hyper = "1" openssl = "0.10" tokio = { version = "1", features = ["full"] } tokio-stream = { version = "0.1", features = ["net"] } -tonic = { version = "0.11", features = ["tls"] } +tonic = { version = "0.12", features = ["tls"] } tower-layer = "0.3" tower-service = "0.3" tracing = { version = "0.1", features = ["attributes", "log"] } @@ -22,4 +22,4 @@ tracing = { version = "0.1", features = ["attributes", "log"] } anyhow = "1" async-trait = "0.1" shared-proto = { path = "../shared_proto" } -tonic-health = "0.11" +tonic-health = "0.12" diff --git a/tests/src/test_server.rs b/tests/src/test_server.rs index 4fce042..e0fd478 100644 --- a/tests/src/test_server.rs +++ b/tests/src/test_server.rs @@ -1,19 +1,19 @@ use futures::future::FutureExt; -use hyper::{Body, Request, Response}; +use hyper::{Request, Response}; use std::{ convert::Infallible, time::{Duration, Instant}, }; use tokio::net::{TcpListener, TcpStream}; use tokio_stream::wrappers::TcpListenerStream; -use tonic::server::NamedService; use tonic::{ body::BoxBody, transport::{ - server::{Router, Routes, Server}, + server::{Router, Server}, ServerTlsConfig, }, }; +use tonic::{server::NamedService, service::Routes}; use tower_layer::Layer; use tower_service::Service; @@ -45,7 +45,7 @@ impl TestServer { tls: Option, ) -> Self where - S: Service, Response = Response, Error = Infallible> + S: Service, Response = Response, Error = Infallible> + NamedService + Clone + Send @@ -86,9 +86,10 @@ impl TestServer { pub async fn start_with_router(router: Router, address: T) -> TestServer where L: Layer + Send + 'static, - L::Service: Service, Response = Response> + Clone + Send + 'static, - <>::Service as Service>>::Future: Send + 'static, - <>::Service as Service>>::Error: + L::Service: + Service, Response = Response> + Clone + Send + 'static, + <>::Service as Service>>::Future: Send + 'static, + <>::Service as Service>>::Error: Into> + Send, T: Into>, { From 83a3f377271f78c376dfe91282e4dff16a1226e4 Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Wed, 10 Jul 2024 16:22:53 +0800 Subject: [PATCH 2/2] add changelog Signed-off-by: Bugen Zhao --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43194c8..02b2441 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Breaking changes + +* Update to **tonic** 0.12 +* Update to **prost** 0.13 + ## 0.7.2 (2024-04-22) ### Fixed