Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from linkerd:main #190

Merged
merged 6 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions linkerd/app/inbound/src/policy/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ static INVALID_POLICY: once_cell::sync::OnceCell<ServerPolicy> = once_cell::sync
impl<S> Api<S>
where
S: tonic::client::GrpcService<tonic::body::BoxBody, Error = Error> + Clone,
S::ResponseBody:
http::Body<Data = tonic::codegen::Bytes, Error = Error> + Default + Send + 'static,
S::ResponseBody: http::Body<Data = tonic::codegen::Bytes, Error = Error> + Send + 'static,
{
pub(super) fn new(
workload: Arc<str>,
Expand All @@ -60,8 +59,7 @@ impl<S> Service<u16> for Api<S>
where
S: tonic::client::GrpcService<tonic::body::BoxBody, Error = Error>,
S: Clone + Send + Sync + 'static,
S::ResponseBody:
http::Body<Data = tonic::codegen::Bytes, Error = Error> + Default + Send + 'static,
S::ResponseBody: http::Body<Data = tonic::codegen::Bytes, Error = Error> + Send + 'static,
S::Future: Send + 'static,
{
type Response =
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/inbound/src/policy/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Config {
C: tonic::client::GrpcService<tonic::body::BoxBody, Error = Error>,
C: Clone + Unpin + Send + Sync + 'static,
C::ResponseBody: http::Body<Data = tonic::codegen::Bytes, Error = Error>,
C::ResponseBody: Default + Send + 'static,
C::ResponseBody: Send + 'static,
C::Future: Send,
{
match self {
Expand Down
6 changes: 2 additions & 4 deletions linkerd/app/inbound/src/policy/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ impl<S> Store<S> {
S: tonic::client::GrpcService<tonic::body::BoxBody, Error = Error>,
S: Clone + Send + Sync + 'static,
S::Future: Send,
S::ResponseBody:
http::Body<Data = tonic::codegen::Bytes, Error = Error> + Default + Send + 'static,
S::ResponseBody: http::Body<Data = tonic::codegen::Bytes, Error = Error> + Send + 'static,
{
let opaque_default = Self::make_opaque(default.clone());
// The initial set of policies never expire from the cache.
Expand Down Expand Up @@ -142,8 +141,7 @@ where
S: tonic::client::GrpcService<tonic::body::BoxBody, Error = Error>,
S: Clone + Send + Sync + 'static,
S::Future: Send,
S::ResponseBody:
http::Body<Data = tonic::codegen::Bytes, Error = Error> + Default + Send + 'static,
S::ResponseBody: http::Body<Data = tonic::codegen::Bytes, Error = Error> + Send + 'static,
{
fn get_policy(&self, dst: OrigDstAddr) -> AllowPolicy {
// Lookup the policy for the target port in the cache. If it doesn't
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/inbound/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl Inbound<()> {
C: tonic::client::GrpcService<tonic::body::BoxBody, Error = Error>,
C: Clone + Unpin + Send + Sync + 'static,
C::ResponseBody: http::Body<Data = tonic::codegen::Bytes, Error = Error>,
C::ResponseBody: Default + Send + 'static,
C::ResponseBody: Send + 'static,
C::Future: Send,
{
self.config
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/outbound/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl Outbound<()> {
C: tonic::client::GrpcService<tonic::body::BoxBody, Error = Error>,
C: Clone + Unpin + Send + Sync + 'static,
C::ResponseBody: proxy::http::Body<Data = tonic::codegen::Bytes, Error = Error>,
C::ResponseBody: Default + Send + 'static,
C::ResponseBody: Send + 'static,
C::Future: Send,
{
policy::Api::new(workload, limits, Duration::from_secs(10), client)
Expand Down
6 changes: 2 additions & 4 deletions linkerd/app/outbound/src/policy/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ static INVALID_POLICY: once_cell::sync::OnceCell<ClientPolicy> = once_cell::sync
impl<S> Api<S>
where
S: tonic::client::GrpcService<tonic::body::BoxBody, Error = Error> + Clone,
S::ResponseBody:
http::Body<Data = tonic::codegen::Bytes, Error = Error> + Default + Send + 'static,
S::ResponseBody: http::Body<Data = tonic::codegen::Bytes, Error = Error> + Send + 'static,
{
pub(crate) fn new(
workload: Arc<str>,
Expand All @@ -59,8 +58,7 @@ impl<S> Service<Addr> for Api<S>
where
S: tonic::client::GrpcService<tonic::body::BoxBody, Error = Error>,
S: Clone + Send + Sync + 'static,
S::ResponseBody:
http::Body<Data = tonic::codegen::Bytes, Error = Error> + Default + Send + 'static,
S::ResponseBody: http::Body<Data = tonic::codegen::Bytes, Error = Error> + Send + 'static,
S::Future: Send + 'static,
{
type Response =
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/src/trace_collector/otel_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ where
S: GrpcService<BoxBody> + Clone + Send + 'static,
S::Error: Into<Error>,
S::Future: Send,
S::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
S::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
<S::ResponseBody as Body>::Error: Into<Error> + Send,
{
let (span_sink, spans_rx) = mpsc::channel(crate::trace_collector::SPAN_BUFFER_CAPACITY);
Expand Down
14 changes: 8 additions & 6 deletions linkerd/opencensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ use linkerd_error::Error;
use linkerd_trace_context::export::{ExportSpan, SpanKind};
use metrics::Registry;
pub use opencensus_proto as proto;
use opencensus_proto::agent::common::v1::Node;
use opencensus_proto::agent::trace::v1::{
trace_service_client::TraceServiceClient, ExportTraceServiceRequest,
use opencensus_proto::{
agent::{
common::v1::Node,
trace::v1::{trace_service_client::TraceServiceClient, ExportTraceServiceRequest},
},
trace::v1::{Span, TruncatableString},
};
use opencensus_proto::trace::v1::{Span, TruncatableString};
use std::collections::HashMap;
use tokio::{sync::mpsc, time};
use tokio_stream::wrappers::ReceiverStream;
Expand All @@ -24,7 +26,7 @@ pub async fn export_spans<T, S>(client: T, node: Node, spans: S, metrics: Regist
where
T: GrpcService<BoxBody> + Clone,
T::Error: Into<Error>,
T::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
T::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<Error> + Send,
S: Stream<Item = ExportSpan> + Unpin,
{
Expand All @@ -49,7 +51,7 @@ impl<T, S> SpanExporter<T, S>
where
T: GrpcService<BoxBody>,
T::Error: Into<Error>,
T::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
T::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<Error> + Send,
S: Stream<Item = ExportSpan> + Unpin,
{
Expand Down
4 changes: 2 additions & 2 deletions linkerd/opentelemetry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub async fn export_spans<T, S>(
) where
T: GrpcService<BoxBody> + Clone,
T::Error: Into<Error>,
T::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
T::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<Error> + Send,
S: Stream<Item = ExportSpan> + Unpin,
{
Expand All @@ -66,7 +66,7 @@ impl<T, S> SpanExporter<T, S>
where
T: GrpcService<BoxBody> + Clone,
T::Error: Into<Error>,
T::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
T::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<Error> + Send,
S: Stream<Item = ExportSpan> + Unpin,
{
Expand Down
4 changes: 2 additions & 2 deletions linkerd/proxy/api-resolve/src/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl<S> Resolve<S>
where
S: GrpcService<BoxBody> + Clone + Send + 'static,
S::Error: Into<Error> + Send,
S::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
S::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
<S::ResponseBody as Body>::Error: Into<Error> + Send,
S::Future: Send,
{
Expand All @@ -48,7 +48,7 @@ where
T: Param<ConcreteAddr>,
S: GrpcService<BoxBody> + Clone + Send + 'static,
S::Error: Into<Error> + Send,
S::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
S::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
<S::ResponseBody as Body>::Error: Into<Error> + Send,
S::Future: Send,
{
Expand Down
8 changes: 4 additions & 4 deletions linkerd/service-profiles/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl<R, S> Client<R, S>
where
S: GrpcService<BoxBody> + Clone + Send + 'static,
S::ResponseBody: Send + Sync,
S::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
S::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
<S::ResponseBody as Body>::Error:
Into<Box<dyn std::error::Error + Send + Sync + 'static>> + Send,
S::Future: Send,
Expand Down Expand Up @@ -65,7 +65,7 @@ impl<T, R, S> Service<T> for Client<R, S>
where
T: Param<LookupAddr>,
S: GrpcService<BoxBody> + Clone + Send + 'static,
S::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
S::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
<S::ResponseBody as Body>::Error:
Into<Box<dyn std::error::Error + Send + Sync + 'static>> + Send,
S::Future: Send,
Expand Down Expand Up @@ -112,7 +112,7 @@ type InnerFuture =
impl<S> Inner<S>
where
S: GrpcService<BoxBody> + Clone + Send + 'static,
S::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
S::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
<S::ResponseBody as Body>::Error:
Into<Box<dyn std::error::Error + Send + Sync + 'static>> + Send,
S::Future: Send,
Expand All @@ -129,7 +129,7 @@ where
impl<S> Service<LookupAddr> for Inner<S>
where
S: GrpcService<BoxBody> + Clone + Send + 'static,
S::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
S::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
<S::ResponseBody as Body>::Error:
Into<Box<dyn std::error::Error + Send + Sync + 'static>> + Send,
S::Future: Send,
Expand Down