diff --git a/Cargo.lock b/Cargo.lock index f8d83b462..b722ac2c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -199,11 +199,10 @@ dependencies = [ [[package]] name = "axum" -version = "0.7.9" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +checksum = "021e862c184ae977658b36c4500f7feac3221ca5da43e3f25bd04ab6c79a29b5" dependencies = [ - "async-trait", "axum-core", "bytes", "futures-util", @@ -219,20 +218,19 @@ dependencies = [ "rustversion", "serde", "sync_wrapper", - "tower 0.5.2", + "tower", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.4.5" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +checksum = "68464cd0412f486726fb3373129ef5d2993f90c34bc2bc1c1e9943b2f4fc7ca6" dependencies = [ - "async-trait", "bytes", - "futures-util", + "futures-core", "http", "http-body", "http-body-util", @@ -909,7 +907,7 @@ dependencies = [ "futures-sink", "futures-timer", "futures-util", - "hashbrown 0.15.2", + "hashbrown", "nonzero_ext", "parking_lot", "portable-atomic", @@ -939,19 +937,13 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.10.0", + "indexmap", "slab", "tokio", "tokio-util", "tracing", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.15.2" @@ -1115,7 +1107,7 @@ dependencies = [ "pin-project", "tokio", "tokio-test", - "tower 0.5.2", + "tower", ] [[package]] @@ -1259,16 +1251,6 @@ dependencies = [ "icu_properties", ] -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.10.0" @@ -1276,7 +1258,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", - "hashbrown 0.15.2", + "hashbrown", ] [[package]] @@ -1441,7 +1423,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -1476,7 +1458,7 @@ dependencies = [ "tokio", "tokio-stream", "tonic", - "tower 0.5.2", + "tower", "tracing", ] @@ -1499,7 +1481,7 @@ dependencies = [ "serde_json", "thiserror 2.0.14", "tokio", - "tower 0.5.2", + "tower", "tracing", ] @@ -1562,7 +1544,7 @@ dependencies = [ "tokio-rustls", "tokio-stream", "tonic", - "tower 0.5.2", + "tower", "tracing", ] @@ -1583,7 +1565,7 @@ dependencies = [ "tokio", "tokio-test", "tonic", - "tower 0.5.2", + "tower", "tower-test", "tracing", ] @@ -1622,7 +1604,7 @@ dependencies = [ "tokio", "tokio-test", "tonic", - "tower 0.5.2", + "tower", "tracing", ] @@ -1659,7 +1641,7 @@ dependencies = [ "tokio-rustls", "tokio-stream", "tonic", - "tower 0.5.2", + "tower", "tracing", "tracing-subscriber", ] @@ -1708,7 +1690,7 @@ dependencies = [ "tokio-rustls", "tokio-test", "tonic", - "tower 0.5.2", + "tower", "tower-test", "tracing", ] @@ -1734,7 +1716,7 @@ dependencies = [ "tokio-stream", "tokio-test", "tonic", - "tower 0.5.2", + "tower", "tracing", "tracing-subscriber", ] @@ -1901,7 +1883,7 @@ dependencies = [ "http", "linkerd-stack", "pin-project", - "tower 0.5.2", + "tower", ] [[package]] @@ -1918,7 +1900,7 @@ dependencies = [ "parking_lot", "pin-project", "tokio", - "tower 0.5.2", + "tower", "tracing", ] @@ -1928,7 +1910,7 @@ version = "0.1.0" dependencies = [ "http", "linkerd-stack", - "tower 0.5.2", + "tower", "tracing", ] @@ -1958,7 +1940,7 @@ dependencies = [ "http-body", "linkerd-stack", "pin-project", - "tower 0.5.2", + "tower", ] [[package]] @@ -1981,7 +1963,7 @@ dependencies = [ "pin-project", "thiserror 2.0.14", "tokio", - "tower 0.5.2", + "tower", "tracing", ] @@ -2033,7 +2015,7 @@ dependencies = [ "pin-project", "thiserror 2.0.14", "tokio", - "tower 0.5.2", + "tower", "tracing", "try-lock", ] @@ -2066,7 +2048,7 @@ dependencies = [ "linkerd-stack", "parking_lot", "tokio", - "tower 0.5.2", + "tower", "tracing", ] @@ -2263,7 +2245,7 @@ dependencies = [ "rand 0.9.2", "tokio", "tokio-test", - "tower 0.5.2", + "tower", "tower-test", "tracing", ] @@ -2285,7 +2267,7 @@ dependencies = [ "linkerd-tonic-stream", "linkerd2-proxy-api", "tonic", - "tower 0.5.2", + "tower", "tracing", ] @@ -2302,7 +2284,7 @@ dependencies = [ "linkerd-proxy-core", "linkerd-stack", "tokio", - "tower 0.5.2", + "tower", "tracing", ] @@ -2360,7 +2342,7 @@ version = "0.1.0" dependencies = [ "futures", "linkerd-error", - "tower 0.5.2", + "tower", ] [[package]] @@ -2375,7 +2357,7 @@ dependencies = [ "linkerd-stack", "tokio", "tokio-stream", - "tower 0.5.2", + "tower", "tracing", ] @@ -2412,7 +2394,7 @@ dependencies = [ "thiserror 2.0.14", "tokio", "tokio-test", - "tower 0.5.2", + "tower", "tower-test", "tracing", ] @@ -2442,7 +2424,7 @@ dependencies = [ "linkerd-proxy-core", "pin-project", "thiserror 2.0.14", - "tower 0.5.2", + "tower", "tracing", ] @@ -2479,7 +2461,7 @@ dependencies = [ "thiserror 2.0.14", "tokio", "tonic", - "tower 0.5.2", + "tower", "tracing", "x509-parser", ] @@ -2510,7 +2492,7 @@ dependencies = [ "thiserror 2.0.14", "tokio", "tonic", - "tower 0.5.2", + "tower", "tracing", ] @@ -2524,7 +2506,7 @@ dependencies = [ "linkerd-proxy-balance", "linkerd-stack", "tokio", - "tower 0.5.2", + "tower", ] [[package]] @@ -2565,7 +2547,7 @@ dependencies = [ "futures", "linkerd-error", "linkerd-stack", - "tower 0.5.2", + "tower", "tracing", ] @@ -2604,7 +2586,7 @@ dependencies = [ "tokio", "tokio-stream", "tonic", - "tower 0.5.2", + "tower", "tracing", ] @@ -2629,7 +2611,7 @@ dependencies = [ "tokio", "tokio-test", "tokio-util", - "tower 0.5.2", + "tower", "tower-test", "tracing", ] @@ -2642,7 +2624,7 @@ dependencies = [ "parking_lot", "tokio", "tokio-test", - "tower 0.5.2", + "tower", "tower-test", ] @@ -2651,7 +2633,7 @@ name = "linkerd-stack-tracing" version = "0.1.0" dependencies = [ "linkerd-stack", - "tower 0.5.2", + "tower", "tracing", ] @@ -2732,7 +2714,7 @@ dependencies = [ "linkerd-stack", "rand 0.8.5", "thiserror 1.0.69", - "tower 0.5.2", + "tower", "tracing", ] @@ -2804,9 +2786,9 @@ dependencies = [ [[package]] name = "linkerd2-proxy-api" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f53a8c17b8e81a58651c4e83cef64a8a3d7fba4d0ed224f3ca7e5c40265ec135" +checksum = "bb83fdbbcea49285182d75aacc20ced8ebce60030be1d72d87b00f58f07d267d" dependencies = [ "h2", "http", @@ -2882,9 +2864,9 @@ dependencies = [ [[package]] name = "matchit" -version = "0.7.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "memchr" @@ -3180,7 +3162,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.10.0", + "indexmap", ] [[package]] @@ -4214,11 +4196,10 @@ dependencies = [ [[package]] name = "tonic" -version = "0.12.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +checksum = "7e581ba15a835f4d9ea06c55ab1bd4dce26fc53752c69a04aac00703bfb49ba9" dependencies = [ - "async-stream", "async-trait", "axum", "base64 0.22.0", @@ -4236,7 +4217,7 @@ dependencies = [ "socket2 0.5.10", "tokio", "tokio-stream", - "tower 0.4.13", + "tower", "tower-layer", "tower-service", "tracing", @@ -4244,9 +4225,9 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.12.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" +checksum = "eac6f67be712d12f0b41328db3137e0d0757645d8904b4cb7d51cd9c2279e847" dependencies = [ "prettyplease", "proc-macro2", @@ -4263,26 +4244,6 @@ dependencies = [ "tonic-build", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand 0.8.5", - "slab", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "tracing", -] - [[package]] name = "tower" version = "0.5.2" @@ -4291,8 +4252,9 @@ checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", - "indexmap 2.10.0", + "indexmap", "pin-project-lite", + "slab", "sync_wrapper", "tokio", "tokio-util", diff --git a/Cargo.toml b/Cargo.toml index 5ff2ef2f3..a790d823a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -117,8 +117,8 @@ prost-types = { version = "0.13" } tokio-rustls = { version = "0.26", default-features = false, features = [ "logging", ] } -tonic = { version = "0.12", default-features = false } -tonic-build = { version = "0.12", default-features = false } +tonic = { version = "0.13", default-features = false } +tonic-build = { version = "0.13", default-features = false } tower = { version = "0.5", default-features = false } tower-service = { version = "0.3" } tower-test = { version = "0.4" } @@ -135,4 +135,4 @@ default-features = false features = ["tokio", "tracing"] [workspace.dependencies.linkerd2-proxy-api] -version = "0.16.0" +version = "0.17.0" diff --git a/linkerd/app/core/src/control.rs b/linkerd/app/core/src/control.rs index 4fcb1133b..51e589dc0 100644 --- a/linkerd/app/core/src/control.rs +++ b/linkerd/app/core/src/control.rs @@ -101,7 +101,7 @@ impl Config { identity: identity::NewClient, ) -> svc::ArcNewService< (), - svc::BoxCloneSyncService, http::Response>, + svc::BoxCloneSyncService, http::Response>, > { let addr = self.addr; tracing::trace!(%addr, "Building"); diff --git a/linkerd/app/inbound/src/policy/api.rs b/linkerd/app/inbound/src/policy/api.rs index 11bc576b6..579939da2 100644 --- a/linkerd/app/inbound/src/policy/api.rs +++ b/linkerd/app/inbound/src/policy/api.rs @@ -33,7 +33,7 @@ static INVALID_POLICY: once_cell::sync::OnceCell = once_cell::sync impl Api where - S: tonic::client::GrpcService + Clone, + S: tonic::client::GrpcService + Clone, S::ResponseBody: http::Body + Send + 'static, { pub(super) fn new( @@ -57,7 +57,7 @@ where impl Service for Api where - S: tonic::client::GrpcService, + S: tonic::client::GrpcService, S: Clone + Send + Sync + 'static, S::ResponseBody: http::Body + Send + 'static, S::Future: Send + 'static, diff --git a/linkerd/app/inbound/src/policy/config.rs b/linkerd/app/inbound/src/policy/config.rs index c9c5bd375..db447e6de 100644 --- a/linkerd/app/inbound/src/policy/config.rs +++ b/linkerd/app/inbound/src/policy/config.rs @@ -40,7 +40,7 @@ impl Config { limits: ReceiveLimits, ) -> impl GetPolicy + Clone + Send + Sync + 'static where - C: tonic::client::GrpcService, + C: tonic::client::GrpcService, C: Clone + Unpin + Send + Sync + 'static, C::ResponseBody: http::Body, C::ResponseBody: Send + 'static, diff --git a/linkerd/app/inbound/src/policy/store.rs b/linkerd/app/inbound/src/policy/store.rs index 14b565326..ae58b4f89 100644 --- a/linkerd/app/inbound/src/policy/store.rs +++ b/linkerd/app/inbound/src/policy/store.rs @@ -74,7 +74,7 @@ impl Store { opaque_ports: RangeInclusiveSet, ) -> Self where - S: tonic::client::GrpcService, + S: tonic::client::GrpcService, S: Clone + Send + Sync + 'static, S::Future: Send, S::ResponseBody: http::Body + Send + 'static, @@ -138,7 +138,7 @@ impl Store { impl GetPolicy for Store where - S: tonic::client::GrpcService, + S: tonic::client::GrpcService, S: Clone + Send + Sync + 'static, S::Future: Send, S::ResponseBody: http::Body + Send + 'static, diff --git a/linkerd/app/inbound/src/policy/tcp/tests.rs b/linkerd/app/inbound/src/policy/tcp/tests.rs index 4fdb825e9..4846a0796 100644 --- a/linkerd/app/inbound/src/policy/tcp/tests.rs +++ b/linkerd/app/inbound/src/policy/tcp/tests.rs @@ -263,7 +263,7 @@ fn orig_dst_addr() -> OrigDstAddr { OrigDstAddr(([192, 0, 2, 2], 1000).into()) } -impl tonic::client::GrpcService for MockSvc { +impl tonic::client::GrpcService for MockSvc { type ResponseBody = linkerd_app_core::control::RspBody; type Error = Error; type Future = futures::future::Pending, Self::Error>>; @@ -275,7 +275,7 @@ impl tonic::client::GrpcService for MockSvc { unreachable!() } - fn call(&mut self, _req: http::Request) -> Self::Future { + fn call(&mut self, _req: http::Request) -> Self::Future { unreachable!() } } diff --git a/linkerd/app/inbound/src/server.rs b/linkerd/app/inbound/src/server.rs index b8458fcce..51cbace86 100644 --- a/linkerd/app/inbound/src/server.rs +++ b/linkerd/app/inbound/src/server.rs @@ -27,7 +27,7 @@ impl Inbound<()> { limits: ReceiveLimits, ) -> impl policy::GetPolicy + Clone + Send + Sync + 'static where - C: tonic::client::GrpcService, + C: tonic::client::GrpcService, C: Clone + Unpin + Send + Sync + 'static, C::ResponseBody: http::Body, C::ResponseBody: Send + 'static, diff --git a/linkerd/app/integration/Cargo.toml b/linkerd/app/integration/Cargo.toml index f09170e98..7a2dcfe23 100644 --- a/linkerd/app/integration/Cargo.toml +++ b/linkerd/app/integration/Cargo.toml @@ -39,7 +39,7 @@ socket2 = "0.6" tokio = { version = "1", features = ["io-util", "net", "rt", "macros"] } tokio-rustls = { workspace = true } tokio-stream = { version = "0.1", features = ["sync"] } -tonic = { workspace = true, features = ["transport"], default-features = false } +tonic = { workspace = true, features = ["transport", "router"], default-features = false } tower = { workspace = true, default-features = false } tracing = { workspace = true } diff --git a/linkerd/app/integration/src/policy.rs b/linkerd/app/integration/src/policy.rs index 977fee256..6b2faa6d7 100644 --- a/linkerd/app/integration/src/policy.rs +++ b/linkerd/app/integration/src/policy.rs @@ -302,7 +302,7 @@ impl Controller { } pub async fn run(self) -> controller::Listening { - let svc = grpc::transport::Server::builder() + let routes = grpc::service::Routes::default() .add_service( inbound_server_policies_server::InboundServerPoliciesServer::new(Server(Arc::new( self.inbound, @@ -310,9 +310,9 @@ impl Controller { ) .add_service(outbound_policies_server::OutboundPoliciesServer::new( Server(Arc::new(self.outbound)), - )) - .into_service(); - controller::run(RoutesSvc(svc), "support policy controller", None).await + )); + + controller::run(RoutesSvc(routes), "support policy controller", None).await } } @@ -525,7 +525,9 @@ impl Service> for RoutesSvc { fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { let Self(routes) = self; - routes.poll_ready(cx) + >>>::poll_ready( + routes, cx, + ) } fn call(&mut self, req: Request) -> Self::Future { diff --git a/linkerd/app/outbound/src/lib.rs b/linkerd/app/outbound/src/lib.rs index 17405e2bb..1d6adb631 100644 --- a/linkerd/app/outbound/src/lib.rs +++ b/linkerd/app/outbound/src/lib.rs @@ -146,7 +146,7 @@ impl Outbound<()> { export_hostname_labels: bool, ) -> impl policy::GetPolicy where - C: tonic::client::GrpcService, + C: tonic::client::GrpcService, C: Clone + Unpin + Send + Sync + 'static, C::ResponseBody: proxy::http::Body, C::ResponseBody: Send + 'static, diff --git a/linkerd/app/outbound/src/policy/api.rs b/linkerd/app/outbound/src/policy/api.rs index 0e6e5a1c0..06e7d1dc7 100644 --- a/linkerd/app/outbound/src/policy/api.rs +++ b/linkerd/app/outbound/src/policy/api.rs @@ -33,7 +33,7 @@ static INVALID_POLICY: once_cell::sync::OnceCell = once_cell::sync impl Api where - S: tonic::client::GrpcService + Clone, + S: tonic::client::GrpcService + Clone, S::ResponseBody: http::Body + Send + 'static, { pub(crate) fn new( @@ -59,7 +59,7 @@ where impl Service for Api where - S: tonic::client::GrpcService, + S: tonic::client::GrpcService, S: Clone + Send + Sync + 'static, S::ResponseBody: http::Body + Send + 'static, S::Future: Send + 'static, diff --git a/linkerd/app/src/dst.rs b/linkerd/app/src/dst.rs index 7b4d6acfb..6f7e473e7 100644 --- a/linkerd/app/src/dst.rs +++ b/linkerd/app/src/dst.rs @@ -43,7 +43,7 @@ impl Config { ) -> Result< Dst< impl svc::Service< - http::Request, + http::Request, Response = http::Response, Error = Error, Future = impl Send, diff --git a/linkerd/app/src/policy.rs b/linkerd/app/src/policy.rs index 218ebe6b2..941e323d8 100644 --- a/linkerd/app/src/policy.rs +++ b/linkerd/app/src/policy.rs @@ -46,7 +46,7 @@ impl Config { ) -> Result< Policy< impl svc::Service< - http::Request, + http::Request, Response = http::Response, Error = Error, Future = impl Send, diff --git a/linkerd/app/src/trace_collector/oc_collector.rs b/linkerd/app/src/trace_collector/oc_collector.rs index 96d92856a..d9afd0a06 100644 --- a/linkerd/app/src/trace_collector/oc_collector.rs +++ b/linkerd/app/src/trace_collector/oc_collector.rs @@ -6,7 +6,7 @@ use linkerd_opencensus::{self as opencensus, metrics, proto}; use std::{collections::HashMap, time::SystemTime}; use tokio::sync::mpsc; use tokio_stream::wrappers::ReceiverStream; -use tonic::{body::BoxBody, client::GrpcService}; +use tonic::{body::Body as TonicBody, client::GrpcService}; use tracing::Instrument; pub(super) fn create_collector( @@ -18,7 +18,7 @@ pub(super) fn create_collector( legacy_metrics: metrics::Registry, ) -> EnabledCollector where - S: GrpcService + Clone + Send + 'static, + S: GrpcService + Clone + Send + 'static, S::Error: Into, S::Future: Send, S::ResponseBody: Body + Send + 'static, diff --git a/linkerd/app/src/trace_collector/otel_collector.rs b/linkerd/app/src/trace_collector/otel_collector.rs index 052cb7100..b1eddc343 100644 --- a/linkerd/app/src/trace_collector/otel_collector.rs +++ b/linkerd/app/src/trace_collector/otel_collector.rs @@ -15,7 +15,7 @@ use std::{ }; use tokio::sync::mpsc; use tokio_stream::wrappers::ReceiverStream; -use tonic::{body::BoxBody, client::GrpcService}; +use tonic::{body::Body as TonicBody, client::GrpcService}; use tracing::Instrument; pub(super) struct OtelCollectorAttributes { @@ -31,7 +31,7 @@ pub(super) fn create_collector( legacy_metrics: metrics::Registry, ) -> EnabledCollector where - S: GrpcService + Clone + Send + 'static, + S: GrpcService + Clone + Send + 'static, S::Error: Into, S::Future: Send, S::ResponseBody: Body + Send + 'static, diff --git a/linkerd/opencensus/src/lib.rs b/linkerd/opencensus/src/lib.rs index 68ac4b645..894e9dd9c 100644 --- a/linkerd/opencensus/src/lib.rs +++ b/linkerd/opencensus/src/lib.rs @@ -19,12 +19,12 @@ use opencensus_proto::{ use std::collections::HashMap; use tokio::{sync::mpsc, time}; use tokio_stream::wrappers::ReceiverStream; -use tonic::{self as grpc, body::BoxBody, client::GrpcService}; +use tonic::{self as grpc, body::Body as TonicBody, client::GrpcService}; use tracing::{debug, info, trace}; pub async fn export_spans(client: T, node: Node, spans: S, metrics: Registry) where - T: GrpcService + Clone, + T: GrpcService + Clone, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + Send, @@ -49,7 +49,7 @@ struct SpanRxClosed; impl SpanExporter where - T: GrpcService, + T: GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + Send, diff --git a/linkerd/opentelemetry/src/lib.rs b/linkerd/opentelemetry/src/lib.rs index 86a32bea0..dfa582ab7 100644 --- a/linkerd/opentelemetry/src/lib.rs +++ b/linkerd/opentelemetry/src/lib.rs @@ -26,7 +26,7 @@ use opentelemetry_proto::{ use opentelemetry_sdk::trace::SpanLinks; pub use opentelemetry_sdk::{self as sdk, trace::SpanData}; use tokio::{sync::mpsc, time}; -use tonic::{self as grpc, body::BoxBody, client::GrpcService}; +use tonic::{self as grpc, body::Body as TonicBody, client::GrpcService}; use tracing::{debug, info, trace}; pub async fn export_spans( @@ -35,7 +35,7 @@ pub async fn export_spans( resource: ResourceAttributesWithSchema, metrics: Registry, ) where - T: GrpcService + Clone, + T: GrpcService + Clone, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + Send, @@ -62,7 +62,7 @@ struct SpanRxClosed; impl SpanExporter where - T: GrpcService + Clone, + T: GrpcService + Clone, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + Send, diff --git a/linkerd/proxy/api-resolve/src/resolve.rs b/linkerd/proxy/api-resolve/src/resolve.rs index 56c6b6079..3e36da54a 100644 --- a/linkerd/proxy/api-resolve/src/resolve.rs +++ b/linkerd/proxy/api-resolve/src/resolve.rs @@ -7,7 +7,7 @@ use linkerd_stack::Param; use linkerd_tonic_stream::{LimitReceiveFuture, ReceiveLimits}; use std::pin::Pin; use std::task::{Context, Poll}; -use tonic::{self as grpc, body::BoxBody, client::GrpcService}; +use tonic::{self as grpc, body::Body as TonicBody, client::GrpcService}; use tower::Service; use tracing::{debug, info, trace}; @@ -22,7 +22,7 @@ pub struct Resolve { impl Resolve where - S: GrpcService + Clone + Send + 'static, + S: GrpcService + Clone + Send + 'static, S::Error: Into + Send, S::ResponseBody: Body + Send + 'static, ::Error: Into + Send, @@ -46,7 +46,7 @@ type ResolveFuture = impl Service for Resolve where T: Param, - S: GrpcService + Clone + Send + 'static, + S: GrpcService + Clone + Send + 'static, S::Error: Into + Send, S::ResponseBody: Body + Send + 'static, ::Error: Into + Send, diff --git a/linkerd/proxy/identity-client/src/certify.rs b/linkerd/proxy/identity-client/src/certify.rs index 61d313fe5..970a9d350 100644 --- a/linkerd/proxy/identity-client/src/certify.rs +++ b/linkerd/proxy/identity-client/src/certify.rs @@ -12,7 +12,7 @@ use std::{ }; use thiserror::Error; use tokio::time; -use tonic::{body::BoxBody, client::GrpcService}; +use tonic::{body::Body as TonicBody, client::GrpcService}; use tracing::{debug, error}; /// Configures the Identity service and local identity. @@ -92,7 +92,7 @@ impl Certify { where C: Credentials, N: NewService<(), Service = S>, - S: GrpcService, + S: GrpcService, S::ResponseBody: Body + Send + 'static, ::Error: Into + Send, { @@ -154,7 +154,7 @@ async fn certify( ) -> Result where C: Credentials, - S: GrpcService, + S: GrpcService, S::ResponseBody: Body + Send + 'static, ::Error: Into + Send, { diff --git a/linkerd/proxy/spire-client/src/api.rs b/linkerd/proxy/spire-client/src/api.rs index 8d5f068b9..bda890d74 100644 --- a/linkerd/proxy/spire-client/src/api.rs +++ b/linkerd/proxy/spire-client/src/api.rs @@ -114,7 +114,7 @@ impl TryFrom for Svid { impl Api where - S: tonic::client::GrpcService + Clone, + S: tonic::client::GrpcService + Clone, S::Error: Into, S::ResponseBody: Default + http::Body + Send + 'static, ::Error: Into + Send, @@ -127,7 +127,7 @@ where impl Service<()> for Api where - S: tonic::client::GrpcService + Clone, + S: tonic::client::GrpcService + Clone, S: Clone + Send + Sync + 'static, S::ResponseBody: Default + http::Body + Send + 'static, ::Error: Into + Send, diff --git a/linkerd/service-profiles/src/client.rs b/linkerd/service-profiles/src/client.rs index 552b7584f..cbc2bd46f 100644 --- a/linkerd/service-profiles/src/client.rs +++ b/linkerd/service-profiles/src/client.rs @@ -10,7 +10,7 @@ use std::{ sync::Arc, task::{Context, Poll}, }; -use tonic::{body::BoxBody, client::GrpcService}; +use tonic::{body::Body as TonicBody, client::GrpcService}; use tracing::debug; /// Creates watches on service profiles. @@ -31,7 +31,7 @@ struct Inner { impl Client where - S: GrpcService + Clone + Send + 'static, + S: GrpcService + Clone + Send + 'static, S::ResponseBody: Send + Sync, S::ResponseBody: Body + Send + 'static, ::Error: @@ -64,7 +64,7 @@ where impl Service for Client where T: Param, - S: GrpcService + Clone + Send + 'static, + S: GrpcService + Clone + Send + 'static, S::ResponseBody: Body + Send + 'static, ::Error: Into> + Send, @@ -111,7 +111,7 @@ type InnerFuture = impl Inner where - S: GrpcService + Clone + Send + 'static, + S: GrpcService + Clone + Send + 'static, S::ResponseBody: Body + Send + 'static, ::Error: Into> + Send, @@ -128,7 +128,7 @@ where impl Service for Inner where - S: GrpcService + Clone + Send + 'static, + S: GrpcService + Clone + Send + 'static, S::ResponseBody: Body + Send + 'static, ::Error: Into> + Send, diff --git a/opencensus-proto/src/gen/opencensus.proto.agent.trace.v1.rs b/opencensus-proto/src/gen/opencensus.proto.agent.trace.v1.rs index 9884c60e0..1b0294e70 100644 --- a/opencensus-proto/src/gen/opencensus.proto.agent.trace.v1.rs +++ b/opencensus-proto/src/gen/opencensus.proto.agent.trace.v1.rs @@ -61,7 +61,7 @@ pub mod trace_service_client { } impl TraceServiceClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -82,13 +82,13 @@ pub mod trace_service_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { TraceServiceClient::new(InterceptedService::new(inner, interceptor)) diff --git a/opentelemetry-proto/src/gen/opentelemetry.proto.collector.trace.v1.rs b/opentelemetry-proto/src/gen/opentelemetry.proto.collector.trace.v1.rs index 9fc9bf385..cb31c710f 100644 --- a/opentelemetry-proto/src/gen/opentelemetry.proto.collector.trace.v1.rs +++ b/opentelemetry-proto/src/gen/opentelemetry.proto.collector.trace.v1.rs @@ -69,7 +69,7 @@ pub mod trace_service_client { } impl TraceServiceClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -90,13 +90,13 @@ pub mod trace_service_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { TraceServiceClient::new(InterceptedService::new(inner, interceptor)) diff --git a/spiffe-proto/src/gen/spiffe.workloadapi.rs b/spiffe-proto/src/gen/spiffe.workloadapi.rs index 3d07d61c5..5077e8ae3 100644 --- a/spiffe-proto/src/gen/spiffe.workloadapi.rs +++ b/spiffe-proto/src/gen/spiffe.workloadapi.rs @@ -59,7 +59,7 @@ pub mod spiffe_workload_api_client { } impl SpiffeWorkloadApiClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -80,13 +80,13 @@ pub mod spiffe_workload_api_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { SpiffeWorkloadApiClient::new(InterceptedService::new(inner, interceptor))