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

hyper/http 1.0 bumps #1352

Closed
wants to merge 21 commits into from
Closed
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: 3 additions & 3 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ tar = "0.4.37"
tracing = "0.1.36"
tracing-subscriber = "0.3.3"
warp = { version = "0.3", default-features = false, features = ["tls"] }
http = "0.2.5"
http = "1.0.0"
json-patch = "1.0.0"
tower = { version = "0.4.13", features = ["limit"] }
tower-http = { version = "0.4.0", features = ["trace", "decompression-gzip"] }
hyper = { version = "0.14.13", features = ["client", "http1", "stream", "tcp"] }
tower-http = { version = "0.5.1", features = ["trace", "decompression-gzip"] }
hyper = { version = "1.1.0", features = ["client", "http1"] }
thiserror = "1.0.29"
backoff = "0.4.0"
clap = { version = "4.0", default-features = false, features = ["std", "cargo", "derive"] }
Expand Down
34 changes: 22 additions & 12 deletions kube-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ws = ["client", "tokio-tungstenite", "rand", "kube-core/ws", "tokio/macros"]
oauth = ["client", "tame-oauth"]
oidc = ["client", "form_urlencoded"]
gzip = ["client", "tower-http/decompression-gzip"]
client = ["config", "__non_core", "hyper", "http-body", "tower", "tower-http", "hyper-timeout", "pin-project", "chrono", "jsonpath-rust", "bytes", "futures", "tokio", "tokio-util", "either"]
client = ["config", "__non_core", "hyper", "http-body", "hyper-tls", "hyper-util", "http-body-util", "tower", "tower-http", "hyper-timeout", "pin-project", "chrono", "jsonpath-rust", "bytes", "futures", "tokio", "tokio-util", "either"]
jsonpatch = ["kube-core/jsonpatch"]
admission = ["kube-core/admission"]
config = ["__non_core", "pem", "home"]
Expand All @@ -44,35 +44,45 @@ home = { version = "0.5.4", optional = true }
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1.0.68"
serde_yaml = { version = "0.9.19", optional = true }
http = "0.2.5"
http-body = { version = "0.4.2", optional = true }
http = "1.0.0"
http-body = { version = "1.0.0", optional = true }
either = { version = "1.6.1", optional = true }
thiserror = "1.0.29"
futures = { version = "0.3.17", optional = true }
pem = { version = "3.0.1", optional = true }
openssl = { version = "0.10.36", optional = true }
rustls = { version = "0.21.4", features = ["dangerous_configuration"], optional = true }
rustls-pemfile = { version = "1.0.0", optional = true }
rustls = { version = "0.22.2", optional = true }
rustls-pemfile = { version = "2.0.0", optional = true }
bytes = { version = "1.1.0", optional = true }
tokio = { version = "1.14.0", features = ["time", "signal", "sync"], optional = true }
kube-core = { path = "../kube-core", version = "=0.88.0" }
jsonpath-rust = { version = "0.4.0", optional = true }
tokio-util = { version = "0.7.0", optional = true, features = ["io", "codec"] }
hyper = { version = "0.14.13", optional = true, features = ["client", "http1", "stream", "tcp"] }
hyper-rustls = { version = "0.24.0", optional = true }
hyper-socks2 = { version = "0.8.0", optional = true, default-features = false }
tokio-tungstenite = { version = "0.20.0", optional = true }
hyper = { version = "1.1.0", optional = true, features = ["client", "http1"] }
hyper-rustls = { version = "0.26.0", optional = true }
hyper-tls = { version = "0.6.0", optional = true }
hyper-util = { version = "0.1.1", optional = true, features = ["client-legacy", "tokio"] }
http-body-util = { version = "0.1.0", optional = true }
#hyper-socks2 = { version = "0.8.0", optional = true, default-features = false } # using fork below
tokio-tungstenite = { version = "0.21.0", optional = true }
tower = { version = "0.4.13", optional = true, features = ["buffer", "filter", "util"] }
tower-http = { version = "0.4.0", optional = true, features = ["auth", "map-response-body", "trace"] }
hyper-timeout = {version = "0.4.1", optional = true }
tower-http = { version = "0.5.1", optional = true, features = ["auth", "map-response-body", "trace"] }
hyper-timeout = {version = "0.5.1", optional = true }
tame-oauth = { version = "0.9.1", features = ["gcp"], optional = true }
pin-project = { version = "1.0.4", optional = true }
rand = { version = "0.8.3", optional = true }
secrecy = { version = "0.8.0", features = ["alloc", "serde"] }
tracing = { version = "0.1.36", features = ["log"], optional = true }
hyper-openssl = { version = "0.9.2", optional = true }
hyper-openssl = { version = "0.10.1", optional = true }
form_urlencoded = { version = "1.2.0", optional = true }

[dependencies.hyper-socks2]
git = "https://github.com/aviramha/hyper-socks2.git"
#branch = "hyper1"
rev = "947387f377ed441e42cc61a3397333a20932f28f"
optional = true
default-features = false

[dependencies.k8s-openapi]
version = "0.21.0"
default-features = false
Expand Down
27 changes: 14 additions & 13 deletions kube-client/src/api/mod.rs
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
//! API helpers for structured interaction with the Kubernetes API

mod core_methods;
#[cfg(feature = "ws")] mod remote_command;
// TODO: reinstate..
//mod core_methods;
//#[cfg(feature = "ws")] mod remote_command;
use std::fmt::Debug;

#[cfg(feature = "ws")] pub use remote_command::{AttachedProcess, TerminalSize};
#[cfg(feature = "ws")] mod portforward;
#[cfg(feature = "ws")] pub use portforward::Portforwarder;
//#[cfg(feature = "ws")] pub use remote_command::{AttachedProcess, TerminalSize};
//#[cfg(feature = "ws")] mod portforward;
//#[cfg(feature = "ws")] pub use portforward::Portforwarder;

mod subresource;
#[cfg(feature = "ws")]
//mod subresource;
/*#[cfg(feature = "ws")]
#[cfg_attr(docsrs, doc(cfg(feature = "ws")))]
pub use subresource::{Attach, AttachParams, Execute, Portforward};
pub use subresource::{Evict, EvictParams, Log, LogParams, ScaleSpec, ScaleStatus};

*/
// Ephemeral containers were stabilized in Kubernetes 1.25.
k8s_openapi::k8s_if_ge_1_25! {
pub use subresource::Ephemeral;
}
//k8s_openapi::k8s_if_ge_1_25! {
// pub use subresource::Ephemeral;
//}

mod util;
//mod util;

pub mod entry;
//pub mod entry;

// Re-exports from kube-core
#[cfg(feature = "admission")]
Expand Down
8 changes: 4 additions & 4 deletions kube-client/src/client/auth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

use crate::config::{AuthInfo, AuthProviderConfig, ExecAuthCluster, ExecConfig, ExecInteractiveMode};

#[cfg(feature = "oauth")] mod oauth;
#[cfg(feature = "oauth")] pub use oauth::Error as OAuthError;
#[cfg(feature = "oidc")] mod oidc;
#[cfg(feature = "oidc")] pub use oidc::errors as oidc_errors;
//#[cfg(feature = "oauth")] mod oauth;
//#[cfg(feature = "oauth")] pub use oauth::Error as OAuthError;
//#[cfg(feature = "oidc")] mod oidc;
//#[cfg(feature = "oidc")] pub use oidc::errors as oidc_errors;
#[cfg(target_os = "windows")] use std::os::windows::process::CommandExt;

#[derive(Error, Debug)]
Expand Down Expand Up @@ -91,13 +91,13 @@
#[cfg(feature = "oauth")]
#[cfg_attr(docsrs, doc(cfg(feature = "oauth")))]
#[error("failed OAuth: {0}")]
OAuth(#[source] OAuthError),

Check failure on line 94 in kube-client/src/client/auth/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

cannot find type `OAuthError` in this scope

error[E0412]: cannot find type `OAuthError` in this scope --> kube-client/src/client/auth/mod.rs:94:21 | 94 | OAuth(#[source] OAuthError), | ^^^^^^^^^^ not found in this scope

Check failure on line 94 in kube-client/src/client/auth/mod.rs

View workflow job for this annotation

GitHub Actions / msrv

cannot find type `OAuthError` in this scope

/// OIDC error
#[cfg(feature = "oidc")]
#[cfg_attr(docsrs, doc(cfg(feature = "oidc")))]
#[error("failed OIDC: {0}")]
Oidc(#[source] oidc_errors::Error),

Check failure on line 100 in kube-client/src/client/auth/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

failed to resolve: use of undeclared crate or module `oidc_errors`

error[E0433]: failed to resolve: use of undeclared crate or module `oidc_errors` --> kube-client/src/client/auth/mod.rs:100:20 | 100 | Oidc(#[source] oidc_errors::Error), | ^^^^^^^^^^^ use of undeclared crate or module `oidc_errors`

/// cluster spec missing while `provideClusterInfo` is true
#[error("Cluster spec must be populated when `provideClusterInfo` is true")]
Expand Down Expand Up @@ -174,9 +174,9 @@
Exec(Arc<Mutex<(SecretString, DateTime<Utc>, AuthInfo)>>),
File(Arc<RwLock<TokenFile>>),
#[cfg(feature = "oauth")]
GcpOauth(Arc<Mutex<oauth::Gcp>>),

Check failure on line 177 in kube-client/src/client/auth/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

failed to resolve: use of undeclared crate or module `oauth`

error[E0433]: failed to resolve: use of undeclared crate or module `oauth` --> kube-client/src/client/auth/mod.rs:177:24 | 177 | GcpOauth(Arc<Mutex<oauth::Gcp>>), | ^^^^^ use of undeclared crate or module `oauth`
#[cfg(feature = "oidc")]
Oidc(Arc<Mutex<oidc::Oidc>>),

Check failure on line 179 in kube-client/src/client/auth/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

failed to resolve: use of undeclared crate or module `oidc`

error[E0433]: failed to resolve: use of undeclared crate or module `oidc` --> kube-client/src/client/auth/mod.rs:179:20 | 179 | Oidc(Arc<Mutex<oidc::Oidc>>), | ^^^^ use of undeclared crate or module `oidc`
}

// For use with `AsyncFilterLayer` to add `Authorization` header with a refreshed token.
Expand Down Expand Up @@ -357,13 +357,13 @@
// We need to differentiate providers because the keys/formats to store token expiration differs.
enum ProviderToken {
#[cfg(feature = "oidc")]
Oidc(oidc::Oidc),

Check failure on line 360 in kube-client/src/client/auth/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

failed to resolve: use of undeclared crate or module `oidc`

error[E0433]: failed to resolve: use of undeclared crate or module `oidc` --> kube-client/src/client/auth/mod.rs:360:10 | 360 | Oidc(oidc::Oidc), | ^^^^ use of undeclared crate or module `oidc`
#[cfg(not(feature = "oidc"))]
Oidc(String),
// "access-token", "expiry" (RFC3339)
GcpCommand(String, Option<DateTime<Utc>>),
#[cfg(feature = "oauth")]
GcpOauth(oauth::Gcp),

Check failure on line 366 in kube-client/src/client/auth/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

failed to resolve: use of undeclared crate or module `oauth`

error[E0433]: failed to resolve: use of undeclared crate or module `oauth` --> kube-client/src/client/auth/mod.rs:366:14 | 366 | GcpOauth(oauth::Gcp), | ^^^^^ use of undeclared crate or module `oauth`
// "access-token", "expires-on" (timestamp)
// Azure(String, Option<DateTime<Utc>>),
}
Expand All @@ -384,7 +384,7 @@

#[cfg(feature = "oidc")]
fn token_from_oidc_provider(provider: &AuthProviderConfig) -> Result<ProviderToken, Error> {
oidc::Oidc::from_config(&provider.config)

Check failure on line 387 in kube-client/src/client/auth/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

failed to resolve: use of undeclared crate or module `oidc`

error[E0433]: failed to resolve: use of undeclared crate or module `oidc` --> kube-client/src/client/auth/mod.rs:387:5 | 387 | oidc::Oidc::from_config(&provider.config) | ^^^^ use of undeclared crate or module `oidc` | help: there is an enum variant `crate::client::AuthError::Oidc` and 3 others; try using the variant's enum | 387 | crate::client::AuthError(&provider.config) | ~~~~~~~~~~~~~~~~~~~~~~~~ 387 | crate::client::auth::ProviderToken(&provider.config) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 387 | crate::client::auth::RefreshableToken(&provider.config) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 387 in kube-client/src/client/auth/mod.rs

View workflow job for this annotation

GitHub Actions / msrv

failed to resolve: use of undeclared crate or module `oidc`
.map_err(Error::Oidc)
.map(ProviderToken::Oidc)
}
Expand Down Expand Up @@ -466,7 +466,7 @@
#[cfg(feature = "oauth")]
{
Ok(ProviderToken::GcpOauth(
oauth::Gcp::default_credentials_with_scopes(provider.config.get("scopes"))

Check failure on line 469 in kube-client/src/client/auth/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

failed to resolve: use of undeclared crate or module `oauth`

error[E0433]: failed to resolve: use of undeclared crate or module `oauth` --> kube-client/src/client/auth/mod.rs:469:13 | 469 | oauth::Gcp::default_credentials_with_scopes(provider.config.get("scopes")) | ^^^^^ use of undeclared crate or module `oauth`

Check failure on line 469 in kube-client/src/client/auth/mod.rs

View workflow job for this annotation

GitHub Actions / msrv

failed to resolve: use of undeclared crate or module `oauth`
.map_err(Error::OAuth)?,
))
}
Expand Down
39 changes: 21 additions & 18 deletions kube-client/src/client/builder.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
use bytes::Bytes;
use http::{header::HeaderMap, Request, Response};
use http_body_util::{combinators::BoxBody, BodyExt, StreamBody};
use hyper::{
self,
client::{connect::Connection, HttpConnector},
body::{Body, Incoming},
client::conn::http1::Connection,
};
use hyper_timeout::TimeoutConnector;
use hyper_tls::HttpsConnector;
use hyper_util::client::legacy::{connect::HttpConnector, Builder as HyperBuilder};
pub use kube_core::response::Status;
use std::time::Duration;
use tokio::io::{AsyncRead, AsyncWrite};
Expand All @@ -17,9 +20,7 @@
use crate::{client::ConfigExt, Client, Config, Error, Result};

/// HTTP body of a dynamic backing type.
///
/// The suggested implementation type is [`hyper::Body`].
pub type DynBody = dyn http_body::Body<Data = Bytes, Error = BoxError> + Send + Unpin;
pub type DynBody = dyn Body<Data = Bytes, Error = BoxError> + Send + Unpin;

/// Builder for [`Client`] instances with customized [tower](`Service`) middleware.
pub struct ClientBuilder<Svc> {
Expand All @@ -34,7 +35,7 @@
/// which provides a default stack as a starting point.
pub fn new(service: Svc, default_namespace: impl Into<String>) -> Self
where
Svc: Service<Request<hyper::Body>>,
Svc: Service<Request<Bytes>>,
{
Self {
service,
Expand All @@ -57,17 +58,17 @@
/// Build a [`Client`] instance with the current [`Service`] stack.
pub fn build<B>(self) -> Client
where
Svc: Service<Request<hyper::Body>, Response = Response<B>> + Send + 'static,
Svc: Service<Request<Bytes>, Response = Response<B>> + Send + 'static,
Svc::Future: Send + 'static,
Svc::Error: Into<BoxError>,
B: http_body::Body<Data = bytes::Bytes> + Send + 'static,
B::Error: Into<BoxError>,
{
Client::new(self.service, self.default_ns)

Check failure on line 67 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

type mismatch resolving `<Svc as Service<Request<Bytes>>>::Response == Response<BoxBody<Bytes, Box<dyn Error + Send + Sync>>>`

error[E0271]: type mismatch resolving `<Svc as Service<Request<Bytes>>>::Response == Response<BoxBody<Bytes, Box<dyn Error + Send + Sync>>>` --> kube-client/src/client/builder.rs:67:21 | 59 | pub fn build<B>(self) -> Client | - found this type parameter ... 67 | Client::new(self.service, self.default_ns) | ----------- ^^^^^^^^^^^^ expected `Response<BoxBody<Bytes, Box<...>>>`, found `Response<B>` | | | required by a bound introduced by this call | = note: expected struct `http::Response<http_body_util::combinators::BoxBody<bytes::Bytes, std::boxed::Box<(dyn std::error::Error + std::marker::Send + std::marker::Sync + 'static)>>>` found struct `http::Response<B>` note: required by a bound in `client::Client::new` --> kube-client/src/client/mod.rs:110:36 | 108 | pub fn new<S, /*B,*/ T>(service: S, default_namespace: T) -> Self | --- required by a bound in this associated function 109 | where 110 | S: Service<Request<Bytes>, Response = Response<BoxBody<Bytes, BoxError>>> + Send + 'static, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Client::new`
}
}

pub type GenericService = BoxService<Request<hyper::Body>, Response<Box<DynBody>>, BoxError>;
pub type GenericService = BoxService<Request<Bytes>, Response<BoxBody<Bytes, BoxError>>, BoxError>;

impl TryFrom<Config> for ClientBuilder<GenericService> {
type Error = Error;
Expand All @@ -85,10 +86,10 @@
connector,
};

return make_generic_builder(connector, config);

Check failure on line 89 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the trait bound `tokio::net::TcpStream: hyper::rt::Write` is not satisfied

error[E0277]: the trait bound `tokio::net::TcpStream: hyper::rt::Write` is not satisfied --> kube-client/src/client/builder.rs:89:41 | 89 | return make_generic_builder(connector, config); | -------------------- ^^^^^^^^^ the trait `hyper::rt::Write` is not implemented for `tokio::net::TcpStream`, which is required by `hyper_util::rt::TokioIo<tokio::net::TcpStream>: tokio::io::AsyncWrite` | | | required by a bound introduced by this call | = help: the following other types implement trait `hyper::rt::Write`: hyper_tls::MaybeHttpsStream<T> hyper_rustls::MaybeHttpsStream<T> hyper_timeout::stream::TimeoutReader<R> hyper_timeout::stream::TimeoutWriter<W> std::boxed::Box<T> hyper_timeout::stream::TimeoutStream<S> hyper::upgrade::Upgraded hyper_util::rt::TokioIo<T> and 2 others = note: required for `hyper_util::rt::TokioIo<tokio::net::TcpStream>` to implement `tokio::io::AsyncWrite` note: required by a bound in `client::builder::make_generic_builder` --> kube-client/src/client/builder.rs:101:40 | 98 | fn make_generic_builder<H>(connector: H, config: Config) -> Result<ClientBuilder<GenericService>, Error> | -------------------- required by a bound in this function ... 101 | H::Response: 'static + AsyncRead + AsyncWrite + Send + Unpin, | ^^^^^^^^^^ required by this bound in `make_generic_builder`

Check failure on line 89 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the trait bound `tokio::net::TcpStream: hyper::rt::Read` is not satisfied

error[E0277]: the trait bound `tokio::net::TcpStream: hyper::rt::Read` is not satisfied --> kube-client/src/client/builder.rs:89:41 | 89 | return make_generic_builder(connector, config); | -------------------- ^^^^^^^^^ the trait `hyper::rt::Read` is not implemented for `tokio::net::TcpStream`, which is required by `hyper_util::rt::TokioIo<tokio::net::TcpStream>: tokio::io::AsyncRead` | | | required by a bound introduced by this call | = help: the following other types implement trait `hyper::rt::Read`: hyper_tls::MaybeHttpsStream<T> hyper_rustls::MaybeHttpsStream<T> hyper_timeout::stream::TimeoutReader<R> hyper_timeout::stream::TimeoutWriter<W> std::boxed::Box<T> hyper_timeout::stream::TimeoutStream<S> hyper::upgrade::Upgraded hyper_util::rt::TokioIo<T> and 2 others = note: required for `hyper_util::rt::TokioIo<tokio::net::TcpStream>` to implement `tokio::io::AsyncRead` note: required by a bound in `client::builder::make_generic_builder` --> kube-client/src/client/builder.rs:101:28 | 98 | fn make_generic_builder<H>(connector: H, config: Config) -> Result<ClientBuilder<GenericService>, Error> | -------------------- required by a bound in this function ... 101 | H::Response: 'static + AsyncRead + AsyncWrite + Send + Unpin, | ^^^^^^^^^ required by this bound in `make_generic_builder`
}

make_generic_builder(connector, config)

Check failure on line 92 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the trait bound `tokio::net::TcpStream: hyper::rt::Write` is not satisfied

error[E0277]: the trait bound `tokio::net::TcpStream: hyper::rt::Write` is not satisfied --> kube-client/src/client/builder.rs:92:30 | 92 | make_generic_builder(connector, config) | -------------------- ^^^^^^^^^ the trait `hyper::rt::Write` is not implemented for `tokio::net::TcpStream`, which is required by `hyper_util::rt::TokioIo<tokio::net::TcpStream>: tokio::io::AsyncWrite` | | | required by a bound introduced by this call | = help: the following other types implement trait `hyper::rt::Write`: hyper_tls::MaybeHttpsStream<T> hyper_rustls::MaybeHttpsStream<T> hyper_timeout::stream::TimeoutReader<R> hyper_timeout::stream::TimeoutWriter<W> std::boxed::Box<T> hyper_timeout::stream::TimeoutStream<S> hyper::upgrade::Upgraded hyper_util::rt::TokioIo<T> and 2 others = note: required for `hyper_util::rt::TokioIo<tokio::net::TcpStream>` to implement `tokio::io::AsyncWrite` note: required by a bound in `client::builder::make_generic_builder` --> kube-client/src/client/builder.rs:101:40 | 98 | fn make_generic_builder<H>(connector: H, config: Config) -> Result<ClientBuilder<GenericService>, Error> | -------------------- required by a bound in this function ... 101 | H::Response: 'static + AsyncRead + AsyncWrite + Send + Unpin, | ^^^^^^^^^^ required by this bound in `make_generic_builder`

Check failure on line 92 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the trait bound `tokio::net::TcpStream: hyper::rt::Read` is not satisfied

error[E0277]: the trait bound `tokio::net::TcpStream: hyper::rt::Read` is not satisfied --> kube-client/src/client/builder.rs:92:30 | 92 | make_generic_builder(connector, config) | -------------------- ^^^^^^^^^ the trait `hyper::rt::Read` is not implemented for `tokio::net::TcpStream`, which is required by `hyper_util::rt::TokioIo<tokio::net::TcpStream>: tokio::io::AsyncRead` | | | required by a bound introduced by this call | = help: the following other types implement trait `hyper::rt::Read`: hyper_tls::MaybeHttpsStream<T> hyper_rustls::MaybeHttpsStream<T> hyper_timeout::stream::TimeoutReader<R> hyper_timeout::stream::TimeoutWriter<W> std::boxed::Box<T> hyper_timeout::stream::TimeoutStream<S> hyper::upgrade::Upgraded hyper_util::rt::TokioIo<T> and 2 others = note: required for `hyper_util::rt::TokioIo<tokio::net::TcpStream>` to implement `tokio::io::AsyncRead` note: required by a bound in `client::builder::make_generic_builder` --> kube-client/src/client/builder.rs:101:28 | 98 | fn make_generic_builder<H>(connector: H, config: Config) -> Result<ClientBuilder<GenericService>, Error> | -------------------- required by a bound in this function ... 101 | H::Response: 'static + AsyncRead + AsyncWrite + Send + Unpin, | ^^^^^^^^^ required by this bound in `make_generic_builder`
}
}

Expand All @@ -97,14 +98,14 @@
fn make_generic_builder<H>(connector: H, config: Config) -> Result<ClientBuilder<GenericService>, Error>
where
H: 'static + Clone + Send + Sync + Service<http::Uri>,
H::Response: 'static + Connection + AsyncRead + AsyncWrite + Send + Unpin,
H::Response: 'static + AsyncRead + AsyncWrite + Send + Unpin,
H::Future: 'static + Send,
H::Error: 'static + Send + Sync + std::error::Error,
{
let default_ns = config.default_namespace.clone();
let auth_layer = config.auth_layer()?;

let client: hyper::Client<_, hyper::Body> = {
let client = {
// Current TLS feature precedence when more than one are set:
// 1. rustls-tls
// 2. openssl-tls
Expand All @@ -120,14 +121,16 @@
return Err(Error::TlsRequired);
}

let mut connector = TimeoutConnector::new(connector);
//TODO: fix bound
//let mut connector = TimeoutConnector::new(connector);

// Set the timeouts for the client
connector.set_connect_timeout(config.connect_timeout);
connector.set_read_timeout(config.read_timeout);
connector.set_write_timeout(config.write_timeout);
// connector.set_connect_timeout(config.connect_timeout);
// connector.set_read_timeout(config.read_timeout);
// connector.set_write_timeout(config.write_timeout);

hyper::Client::builder().build(connector)
use hyper_util::rt::TokioExecutor; // seems necessary now
HyperBuilder::new(TokioExecutor::new()).build(connector)

Check failure on line 133 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the trait bound `<H as tower::Service<http::Uri>>::Response: hyper::rt::Write` is not satisfied

error[E0277]: the trait bound `<H as tower::Service<http::Uri>>::Response: hyper::rt::Write` is not satisfied --> kube-client/src/client/builder.rs:133:55 | 133 | HyperBuilder::new(TokioExecutor::new()).build(connector) | ----- ^^^^^^^^^ the trait `hyper::rt::Write` is not implemented for `<H as tower::Service<http::Uri>>::Response`, which is required by `hyper_rustls::HttpsConnector<H>: hyper_util::client::legacy::connect::Connect` | | | required by a bound introduced by this call | = note: required for `hyper_rustls::HttpsConnector<H>` to implement `tower::Service<http::Uri>` = note: required for `hyper_rustls::HttpsConnector<H>` to implement `hyper_util::client::legacy::connect::Connect` note: required by a bound in `hyper_util::client::legacy::Builder::build` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-util-0.1.3/src/client/legacy/client.rs:1476:12 | 1474 | pub fn build<C, B>(&self, connector: C) -> Client<C, B> | ----- required by a bound in this associated function 1475 | where 1476 | C: Connect + Clone, | ^^^^^^^ required by this bound in `Builder::build` help: consider further restricting the associated type | 103 | H::Error: 'static + Send + Sync + std::error::Error, <H as tower::Service<http::Uri>>::Response: hyper::rt::Write | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 133 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the trait bound `<H as tower::Service<http::Uri>>::Response: hyper::rt::Read` is not satisfied

error[E0277]: the trait bound `<H as tower::Service<http::Uri>>::Response: hyper::rt::Read` is not satisfied --> kube-client/src/client/builder.rs:133:55 | 133 | HyperBuilder::new(TokioExecutor::new()).build(connector) | ----- ^^^^^^^^^ the trait `hyper::rt::Read` is not implemented for `<H as tower::Service<http::Uri>>::Response`, which is required by `hyper_rustls::HttpsConnector<H>: hyper_util::client::legacy::connect::Connect` | | | required by a bound introduced by this call | = note: required for `hyper_rustls::HttpsConnector<H>` to implement `tower::Service<http::Uri>` = note: required for `hyper_rustls::HttpsConnector<H>` to implement `hyper_util::client::legacy::connect::Connect` note: required by a bound in `hyper_util::client::legacy::Builder::build` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-util-0.1.3/src/client/legacy/client.rs:1476:12 | 1474 | pub fn build<C, B>(&self, connector: C) -> Client<C, B> | ----- required by a bound in this associated function 1475 | where 1476 | C: Connect + Clone, | ^^^^^^^ required by this bound in `Builder::build` help: consider further restricting the associated type | 103 | H::Error: 'static + Send + Sync + std::error::Error, <H as tower::Service<http::Uri>>::Response: hyper::rt::Read | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 133 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the trait bound `<H as tower::Service<http::Uri>>::Response: hyper_util::client::legacy::connect::Connection` is not satisfied

error[E0277]: the trait bound `<H as tower::Service<http::Uri>>::Response: hyper_util::client::legacy::connect::Connection` is not satisfied --> kube-client/src/client/builder.rs:133:55 | 133 | HyperBuilder::new(TokioExecutor::new()).build(connector) | ----- ^^^^^^^^^ the trait `hyper_util::client::legacy::connect::Connection` is not implemented for `<H as tower::Service<http::Uri>>::Response`, which is required by `hyper_rustls::HttpsConnector<H>: hyper_util::client::legacy::connect::Connect` | | | required by a bound introduced by this call | = note: required for `hyper_rustls::HttpsConnector<H>` to implement `tower::Service<http::Uri>` = note: required for `hyper_rustls::HttpsConnector<H>` to implement `hyper_util::client::legacy::connect::Connect` note: required by a bound in `hyper_util::client::legacy::Builder::build` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-util-0.1.3/src/client/legacy/client.rs:1476:12 | 1474 | pub fn build<C, B>(&self, connector: C) -> Client<C, B> | ----- required by a bound in this associated function 1475 | where 1476 | C: Connect + Clone, | ^^^^^^^ required by this bound in `Builder::build` help: consider further restricting the associated type | 103 | H::Error: 'static + Send + Sync + std::error::Error, <H as tower::Service<http::Uri>>::Response: hyper_util::client::legacy::connect::Connection | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
};

let stack = ServiceBuilder::new().layer(config.base_uri_layer()).into_inner();
Expand All @@ -145,7 +148,7 @@
// Attribute names follow [Semantic Conventions].
// [Semantic Conventions]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md
TraceLayer::new_for_http()
.make_span_with(|req: &Request<hyper::Body>| {
.make_span_with(|req: &Request<Incoming>| {
tracing::debug_span!(
"HTTP",
http.method = %req.method(),
Expand All @@ -156,10 +159,10 @@
otel.status_code = tracing::field::Empty,
)
})
.on_request(|_req: &Request<hyper::Body>, _span: &Span| {
.on_request(|_req: &Request<Incoming>, _span: &Span| {
tracing::debug!("requesting");
})
.on_response(|res: &Response<hyper::Body>, _latency: Duration, span: &Span| {
.on_response(|res: &Response<Incoming>, _latency: Duration, span: &Span| {
let status = res.status();
span.record("http.status_code", status.as_u16());
if status.is_client_error() || status.is_server_error() {
Expand Down Expand Up @@ -192,9 +195,9 @@
.service(client);

Ok(ClientBuilder::new(
BoxService::new(
MapResponseBodyLayer::new(|body| {

Check failure on line 199 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the size for values of type `dyn http_body::Body` cannot be known at compilation time

error[E0277]: the size for values of type `dyn http_body::Body` cannot be known at compilation time --> kube-client/src/client/builder.rs:199:40 | 199 | MapResponseBodyLayer::new(|body| { | ^^^^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `dyn http_body::Body` = note: all function arguments must have a statically known size = help: unsized fn params are gated as an unstable feature
Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody>

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the size for values of type `dyn http_body::Body` cannot be known at compilation time

error[E0277]: the size for values of type `dyn http_body::Body` cannot be known at compilation time --> kube-client/src/client/builder.rs:200:51 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `dyn http_body::Body` = note: all function arguments must have a statically known size = help: unsized fn params are gated as an unstable feature

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

`dyn http_body::Body` cannot be unpinned

error[E0277]: `dyn http_body::Body` cannot be unpinned --> kube-client/src/client/builder.rs:200:17 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `__Origin<'_, dyn Body, fn(<dyn Body as Body>::Error) -> Box<...> {<... as From<...>>::from}>`, the trait `std::marker::Unpin` is not implemented for `dyn http_body::Body`, which is required by `http_body_util::combinators::MapErr<dyn http_body::Body, fn(<dyn http_body::Body as http_body::Body>::Error) -> std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync> {<std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync> as std::convert::From<<dyn http_body::Body as http_body::Body>::Error>>::from}>: std::marker::Unpin` | = note: the full trait has been written to '/home/runner/work/kube/kube/target/debug/deps/kube_client-09fb6e429bb87576.long-type-15092599368866313213.txt' = note: consider using the `pin!` macro consider using `Box::pin` if you need to access the pinned value outside of the current scope note: required because it appears within the type `__Origin<'_, dyn Body, fn(<dyn Body as Body>::Error) -> Box<...> {<... as From<...>>::from}>` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-body-util-0.1.0/src/combinators/map_err.rs:10:1 | 10 | / pin_project! { 11 | | /// Body returned by the [`map_err`] combinator. 12 | | /// 13 | | /// [`map_err`]: crate::BodyExt::map_err ... | 19 | | } 20 | | } | |_^ = note: required for `MapErr<dyn Body, fn(<dyn Body as Body>::Error) -> Box<dyn Error + Send + Sync> {<... as From<...>>::from}>` to implement `std::marker::Unpin` = note: the full type name has been written to '/home/runner/work/kube/kube/target/debug/deps/kube_client-09fb6e429bb87576.long-type-6299840359524281934.txt' = note: required for the cast from `Box<MapErr<dyn Body, fn(<dyn Body as Body>::Error) -> Box<...> {<... as From<...>>::from}>>` to `Box<dyn Body<Data = Bytes, Error = Box<dyn Error + Send + Sync>> + Send + Unpin>` = note: the full name for the type has been written to '/home/runner/work/kube/kube/target/debug/deps/kube_client-09fb6e429bb87576.long-type-15004451591121006522.txt' = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

`dyn http_body::Body` cannot be sent between threads safely

error[E0277]: `dyn http_body::Body` cannot be sent between threads safely --> kube-client/src/client/builder.rs:200:17 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn http_body::Body` cannot be sent between threads safely | = note: the full trait has been written to '/home/runner/work/kube/kube/target/debug/deps/kube_client-09fb6e429bb87576.long-type-6299840359524281934.txt' = help: within `MapErr<dyn Body, fn(<dyn Body as Body>::Error) -> Box<dyn Error + Send + Sync> {<... as From<...>>::from}>`, the trait `std::marker::Send` is not implemented for `dyn http_body::Body`, which is required by `http_body_util::combinators::MapErr<dyn http_body::Body, fn(<dyn http_body::Body as http_body::Body>::Error) -> std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync> {<std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync> as std::convert::From<<dyn http_body::Body as http_body::Body>::Error>>::from}>: std::marker::Send` note: required because it appears within the type `MapErr<dyn Body, fn(<dyn Body as Body>::Error) -> Box<dyn Error + Send + Sync> {<... as From<...>>::from}>` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-body-util-0.1.0/src/combinators/map_err.rs:15:16 | 15 | pub struct MapErr<B, F> { | ^^^^^^ = note: required for the cast from `Box<MapErr<dyn Body, fn(<dyn Body as Body>::Error) -> Box<...> {<... as From<...>>::from}>>` to `Box<dyn Body<Data = Bytes, Error = Box<dyn Error + Send + Sync>> + Send + Unpin>` = note: the full name for the type has been written to '/home/runner/work/kube/kube/target/debug/deps/kube_client-09fb6e429bb87576.long-type-15004451591121006522.txt'

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

type mismatch resolving `<MapErr<dyn Body, fn(<dyn Body as Body>::Error) -> Box<dyn Error + Send + Sync> {<Box<dyn Error + Send + Sync> as From<<dyn Body as Body>::Error>>::from}> as Body>::Data == Bytes`

error[E0271]: type mismatch resolving `<MapErr<dyn Body, fn(<dyn Body as Body>::Error) -> Box<dyn Error + Send + Sync> {<Box<dyn Error + Send + Sync> as From<<dyn Body as Body>::Error>>::from}> as Body>::Data == Bytes` --> kube-client/src/client/builder.rs:200:17 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Bytes`, found associated type | = note: expected struct `bytes::Bytes` found associated type `<dyn http_body::Body as http_body::Body>::Data` = help: consider constraining the associated type `<dyn http_body::Body as http_body::Body>::Data` to `bytes::Bytes` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html = note: required for the cast from `Box<MapErr<dyn Body, fn(<dyn Body as Body>::Error) -> Box<...> {<... as From<...>>::from}>>` to `Box<dyn Body<Data = Bytes, Error = Box<dyn Error + Send + Sync>> + Send + Unpin>` = note: the full name for the type has been written to '/home/runner/work/kube/kube/target/debug/deps/kube_client-09fb6e429bb87576.long-type-15004451591121006522.txt'

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the size for values of type `dyn http_body::Body` cannot be known at compilation time

error[E0277]: the size for values of type `dyn http_body::Body` cannot be known at compilation time --> kube-client/src/client/builder.rs:200:17 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `dyn http_body::Body` note: required by an implicit `Sized` bound in `http_body_util::combinators::MapErr` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-body-util-0.1.0/src/combinators/map_err.rs:15:23 | 15 | pub struct MapErr<B, F> { | ^ required by the implicit `Sized` requirement on this type parameter in `MapErr`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

`<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely

error[E0277]: `<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely --> kube-client/src/client/builder.rs:200:17 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

`<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely

error[E0277]: `<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely --> kube-client/src/client/builder.rs:200:17 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely | = help: the trait `std::marker::Send` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the trait bound `<dyn http_body::Body as http_body::Body>::Error: std::error::Error` is not satisfied

error[E0277]: the trait bound `<dyn http_body::Body as http_body::Body>::Error: std::error::Error` is not satisfied --> kube-client/src/client/builder.rs:200:17 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::error::Error` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` | = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the size for values of type `dyn http_body::Body` cannot be known at compilation time

error[E0277]: the size for values of type `dyn http_body::Body` cannot be known at compilation time --> kube-client/src/client/builder.rs:200:17 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `dyn http_body::Body` note: required by an implicit `Sized` bound in `http_body_util::combinators::MapErr` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-body-util-0.1.0/src/combinators/map_err.rs:15:23 | 15 | pub struct MapErr<B, F> { | ^ required by the implicit `Sized` requirement on this type parameter in `MapErr`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

`<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely

error[E0277]: `<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely --> kube-client/src/client/builder.rs:200:17 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^ `<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

`<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely

error[E0277]: `<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely --> kube-client/src/client/builder.rs:200:17 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^ `<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely | = help: the trait `std::marker::Send` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the trait bound `<dyn http_body::Body as http_body::Body>::Error: std::error::Error` is not satisfied

error[E0277]: the trait bound `<dyn http_body::Body as http_body::Body>::Error: std::error::Error` is not satisfied --> kube-client/src/client/builder.rs:200:17 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^ the trait `std::error::Error` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` | = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the size for values of type `dyn http_body::Body` cannot be known at compilation time

error[E0277]: the size for values of type `dyn http_body::Body` cannot be known at compilation time --> kube-client/src/client/builder.rs:200:26 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `dyn http_body::Body` note: required by an implicit `Sized` bound in `http_body_util::combinators::MapErr` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-body-util-0.1.0/src/combinators/map_err.rs:15:23 | 15 | pub struct MapErr<B, F> { | ^ required by the implicit `Sized` requirement on this type parameter in `MapErr`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

`<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely

error[E0277]: `<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely --> kube-client/src/client/builder.rs:200:26 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

`<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely

error[E0277]: `<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely --> kube-client/src/client/builder.rs:200:26 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely | = help: the trait `std::marker::Send` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the trait bound `<dyn http_body::Body as http_body::Body>::Error: std::error::Error` is not satisfied

error[E0277]: the trait bound `<dyn http_body::Body as http_body::Body>::Error: std::error::Error` is not satisfied --> kube-client/src/client/builder.rs:200:26 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::error::Error` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` | = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

`<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely

error[E0277]: `<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely --> kube-client/src/client/builder.rs:200:57 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^ `<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<(dyn std::error::Error + std::marker::Send + std::marker::Sync + 'static)>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<(dyn std::error::Error + std::marker::Send + std::marker::Sync + 'static)>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

`<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely

error[E0277]: `<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely --> kube-client/src/client/builder.rs:200:57 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^ `<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely | = help: the trait `std::marker::Send` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<(dyn std::error::Error + std::marker::Send + std::marker::Sync + 'static)>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<(dyn std::error::Error + std::marker::Send + std::marker::Sync + 'static)>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the trait bound `<dyn http_body::Body as http_body::Body>::Error: std::error::Error` is not satisfied

error[E0277]: the trait bound `<dyn http_body::Body as http_body::Body>::Error: std::error::Error` is not satisfied --> kube-client/src/client/builder.rs:200:57 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^ the trait `std::error::Error` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<(dyn std::error::Error + std::marker::Send + std::marker::Sync + 'static)>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` | = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<(dyn std::error::Error + std::marker::Send + std::marker::Sync + 'static)>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

`<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely

error[E0277]: `<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely --> kube-client/src/client/builder.rs:200:26 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^^^^^^^^^^ `<dyn http_body::Body as http_body::Body>::Error` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

`<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely

error[E0277]: `<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely --> kube-client/src/client/builder.rs:200:26 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^^^^^^^^^^ `<dyn http_body::Body as http_body::Body>::Error` cannot be sent between threads safely | = help: the trait `std::marker::Send` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the trait bound `<dyn http_body::Body as http_body::Body>::Error: std::error::Error` is not satisfied

error[E0277]: the trait bound `<dyn http_body::Body as http_body::Body>::Error: std::error::Error` is not satisfied --> kube-client/src/client/builder.rs:200:26 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::error::Error` is not implemented for `<dyn http_body::Body as http_body::Body>::Error`, which is required by `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>: std::convert::From<<dyn http_body::Body as http_body::Body>::Error>` | = help: the following other types implement trait `std::convert::From<T>`: <std::boxed::Box<indexmap::map::slice::Slice<K, V>> as std::convert::From<&indexmap::map::slice::Slice<K, V>>> <std::boxed::Box<indexmap::set::slice::Slice<T>> as std::convert::From<&indexmap::set::slice::Slice<T>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::borrow::Cow<'_, std::ffi::OsStr>>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<std::ffi::OsString>> <std::boxed::Box<std::ffi::OsStr> as std::convert::From<&std::ffi::OsStr>> <std::boxed::Box<std::path::Path> as std::convert::From<std::borrow::Cow<'_, std::path::Path>>> <std::boxed::Box<std::path::Path> as std::convert::From<std::path::PathBuf>> <std::boxed::Box<std::path::Path> as std::convert::From<&std::path::Path>> and 21 others = note: required for `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>` to implement `std::convert::From<<dyn http_body::Body as http_body::Body>::Error>`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the size for values of type `dyn http_body::Body` cannot be known at compilation time

error[E0277]: the size for values of type `dyn http_body::Body` cannot be known at compilation time --> kube-client/src/client/builder.rs:200:26 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `dyn http_body::Body` note: required by a bound in `http_body_util::BodyExt::map_err` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-body-util-0.1.0/src/lib.rs:59:15 | 57 | fn map_err<F, E>(self, f: F) -> MapErr<Self, F> | ------- required by a bound in this associated function 58 | where 59 | Self: Sized, | ^^^^^ required by this bound in `BodyExt::map_err`

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

trait objects must include the `dyn` keyword

error[E0782]: trait objects must include the `dyn` keyword --> kube-client/src/client/builder.rs:200:26 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^ | help: add `dyn` keyword before this trait | 200 | Box::new(<dyn http_body::Body>::map_err(body, BoxError::from)) as Box<DynBody> | ++++ +

Check failure on line 200 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

the value of the associated types `Error` and `Data` in `http_body::Body` must be specified

error[E0191]: the value of the associated types `Error` and `Data` in `http_body::Body` must be specified --> kube-client/src/client/builder.rs:200:26 | 200 | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> | ^^^^^^^^^^^^^^^ help: specify the associated types: `http_body::Body<Data = Type, Error = Type>`
})
.layer(service),
),

Check failure on line 203 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

mismatched types

error[E0308]: mismatched types --> kube-client/src/client/builder.rs:198:9 | 197 | Ok(ClientBuilder::new( | ------------------ arguments to this function are incorrect 198 | / BoxService::new( 199 | | MapResponseBodyLayer::new(|body| { 200 | | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> 201 | | }) 202 | | .layer(service), 203 | | ), | |_________^ expected `bytes::Bytes`, found `hyper::body::Incoming` | = note: expected struct `BoxService<Request<Bytes>, Response<BoxBody<Bytes, Box<dyn Error + Send + Sync>>>, Box<...>>` found struct `tower::util::BoxService<http::Request<hyper::body::Incoming>, http::Response<_>, _>` = note: the full type name has been written to '/home/runner/work/kube/kube/target/debug/deps/kube_client-09fb6e429bb87576.long-type-2969633616524633164.txt' note: associated function defined here --> kube-client/src/client/builder.rs:36:12 | 36 | pub fn new(service: Svc, default_namespace: impl Into<String>) -> Self | ^^^ ------------

Check failure on line 203 in kube-client/src/client/builder.rs

View workflow job for this annotation

GitHub Actions / clippy

type mismatch in closure arguments

error[E0631]: type mismatch in closure arguments --> kube-client/src/client/builder.rs:198:9 | 198 | / BoxService::new( 199 | | MapResponseBodyLayer::new(|body| { | | ------ found signature defined here 200 | | Box::new(http_body::Body::map_err(body, BoxError::from)) as Box<DynBody> 201 | | }) 202 | | .layer(service), 203 | | ), | |_________^ expected due to this | = note: expected closure signature `fn(tower_http::decompression::DecompressionBody<tower_http::trace::ResponseBody<hyper::body::Incoming, tower_http::classify::NeverClassifyEos<tower_http::classify::ServerErrorsFailureClass>, (), {closure@kube-client/src/client/builder.rs:174:25: 174:83}, {closure@kube-client/src/client/builder.rs:177:29: 177:92}>>) -> _` found closure signature `fn(dyn http_body::Body) -> _` = note: required for `MapResponseBody<BaseUri<Decompression<Either<Either<AddAuthorization<ExtraHeaders<...>>, ...>, ...>>>, ...>` to implement `tower::Service<http::Request<hyper::body::Incoming>>` = note: the full type name has been written to '/home/runner/work/kube/kube/target/debug/deps/kube_client-09fb6e429bb87576.long-type-17305735611663094137.txt'
Expand Down
34 changes: 16 additions & 18 deletions kube-client/src/client/config_ext.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::sync::Arc;

use http::{header::HeaderName, HeaderValue};
use hyper_util::client::legacy::connect::HttpConnector;
use secrecy::ExposeSecret;
use tower::{filter::AsyncFilterLayer, util::Either};

Expand All @@ -26,7 +27,7 @@ pub trait ConfigExt: private::Sealed {
/// Layer to add non-authn HTTP headers depending on the config.
fn extra_headers_layer(&self) -> Result<ExtraHeadersLayer>;

/// Create [`hyper_rustls::HttpsConnector`] based on config.
/// Create [`HttpsConnector`] based on config.
///
/// # Example
///
Expand All @@ -41,16 +42,16 @@ pub trait ConfigExt: private::Sealed {
/// ```
#[cfg_attr(docsrs, doc(cfg(feature = "rustls-tls")))]
#[cfg(feature = "rustls-tls")]
fn rustls_https_connector(&self) -> Result<hyper_rustls::HttpsConnector<hyper::client::HttpConnector>>;
fn rustls_https_connector(&self) -> Result<hyper_rustls::HttpsConnector<HttpConnector>>;

/// Create [`hyper_rustls::HttpsConnector`] based on config and `connector`.
/// Create [`HttpsConnector`] based on config and `connector`.
///
/// # Example
///
/// ```rust
/// # async fn doc() -> Result<(), Box<dyn std::error::Error>> {
/// # use kube::{client::ConfigExt, Config};
/// # use hyper::client::HttpConnector;
/// # use hyper_util::client::legacy::connect::HttpConnector;
/// let config = Config::infer().await?;
/// let mut connector = HttpConnector::new();
/// connector.enforce_http(false);
Expand All @@ -71,7 +72,7 @@ pub trait ConfigExt: private::Sealed {
///
/// ```rust
/// # async fn doc() -> Result<(), Box<dyn std::error::Error>> {
/// # use hyper::client::HttpConnector;
/// # use hyper_util::client::legacy::connect::HttpConnector;
/// # use kube::{client::ConfigExt, Config};
/// let config = Config::infer().await?;
/// let https = {
Expand All @@ -87,7 +88,7 @@ pub trait ConfigExt: private::Sealed {
#[cfg(feature = "rustls-tls")]
fn rustls_client_config(&self) -> Result<rustls::ClientConfig>;

/// Create [`hyper_openssl::HttpsConnector`] based on config.
/// Create [`HttpsConnector`] based on config.
/// # Example
///
/// ```rust
Expand All @@ -100,14 +101,14 @@ pub trait ConfigExt: private::Sealed {
/// ```
#[cfg_attr(docsrs, doc(cfg(feature = "openssl-tls")))]
#[cfg(feature = "openssl-tls")]
fn openssl_https_connector(&self) -> Result<hyper_openssl::HttpsConnector<hyper::client::HttpConnector>>;
fn openssl_https_connector(&self) -> Result<HttpsConnector<HttpConnector>>;

/// Create [`hyper_openssl::HttpsConnector`] based on config and `connector`.
/// Create [`HttpsConnector`] based on config and `connector`.
/// # Example
///
/// ```rust
/// # async fn doc() -> Result<(), Box<dyn std::error::Error>> {
/// # use hyper::client::HttpConnector;
/// # use hyper_util::client::legacy::connect::HttpConnector;
/// # use kube::{client::ConfigExt, Config};
/// let mut http = HttpConnector::new();
/// http.enforce_http(false);
Expand All @@ -134,7 +135,7 @@ pub trait ConfigExt: private::Sealed {
///
/// ```rust
/// # async fn doc() -> Result<(), Box<dyn std::error::Error>> {
/// # use hyper::client::HttpConnector;
/// # use hyper_util::client::legacy::connect::HttpConnector;
/// # use kube::{client::ConfigExt, Client, Config};
/// let config = Config::infer().await?;
/// let https = {
Expand Down Expand Up @@ -214,8 +215,8 @@ impl ConfigExt for Config {
}

#[cfg(feature = "rustls-tls")]
fn rustls_https_connector(&self) -> Result<hyper_rustls::HttpsConnector<hyper::client::HttpConnector>> {
let mut connector = hyper::client::HttpConnector::new();
fn rustls_https_connector(&self) -> Result<hyper_rustls::HttpsConnector<HttpConnector>> {
let mut connector = HttpConnector::new();
connector.enforce_http(false);
self.rustls_https_connector_with_connector(connector)
}
Expand Down Expand Up @@ -244,17 +245,14 @@ impl ConfigExt for Config {
}

#[cfg(feature = "openssl-tls")]
fn openssl_https_connector(&self) -> Result<hyper_openssl::HttpsConnector<hyper::client::HttpConnector>> {
let mut connector = hyper::client::HttpConnector::new();
fn openssl_https_connector(&self) -> Result<HttpsConnector<HttpConnector>> {
let mut connector = HttpConnector::new();
connector.enforce_http(false);
self.openssl_https_connector_with_connector(connector)
}

#[cfg(feature = "openssl-tls")]
fn openssl_https_connector_with_connector<H>(
&self,
connector: H,
) -> Result<hyper_openssl::HttpsConnector<H>>
fn openssl_https_connector_with_connector<H>(&self, connector: H) -> Result<HttpsConnector<H>>
where
H: tower::Service<http::Uri> + Send,
H::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
Expand Down
Loading
Loading