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

dependencies: update to tonic 0.12 #1170

Merged
merged 5 commits into from
Jul 9, 2024
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
664 changes: 306 additions & 358 deletions Cargo.lock

Large diffs are not rendered by default.

15 changes: 6 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ hickory-client = "0.24"
hickory-proto = "0.24"
hickory-resolver = "0.24"
hickory-server = { version = "0.24", features = [ "hickory-resolver" ] }
http-02 = { package = "http", version = "0.2.9" }
http-body-04 = { package = "http-body", version = "0.4" }
http-body-1 = { package = "http-body", version = "1.0.0-rc.2" }
http-body = { package = "http-body", version = "1" }
http-body-util = "0.1"
http-types = { version = "2.12", default-features = false }
hyper = { version = "1.3", features = ["full"] }
Expand All @@ -70,8 +68,8 @@ ppp = "2.2"
pprof = { version = "0.13", features = ["protobuf", "protobuf-codec", "criterion"] }
prometheus-client = { version = "0.22" }
prometheus-parse = "0.2"
prost = "0.12"
prost-types = "0.12"
prost = "0.13"
prost-types = "0.13"
rand = "0.8"
rcgen = { version = "0.13", optional = true, features = ["pem"] }
rustls = { version = "0.23", default-features = false }
Expand All @@ -87,9 +85,8 @@ tls-listener = { version = "0.10" }
tokio = { version = "1.0", features = ["full", "test-util"] }
tokio-rustls = { version = "0.26", default-features = false }
tokio-stream = { version = "0.1", features = ["net"] }
tonic = { version = "0.11", default-features = false, features = ["prost", "codegen"] }
tonic = { version = "0.12", default-features = false, features = ["prost", "codegen"] }
tower = { version = "0.4", features = ["full"] }
tower-hyper-http-body-compat = { git = "https://github.com/howardjohn/tower-hyper-http-body-compat", branch = "deps/hyper-1.0.0-snapshot1", features = ["server", "http2"] }
tracing = { version = "0.1"}
tracing-subscriber = { version = "0.3", features = ["registry", "env-filter", "json"] }
url = "2.2"
Expand All @@ -111,8 +108,8 @@ tokio-util = { version = "0.7.11", features = ["io-util"] }
netns-rs = "0.1"

[build-dependencies]
tonic-build = { version = "0.11", default-features = false, features = ["prost"] }
prost-build = "0.12"
tonic-build = { version = "0.12", default-features = false, features = ["prost"] }
prost-build = "0.13"
anyhow = "1.0"
rustc_version = "0.4"

Expand Down
1 change: 0 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,4 @@ skip = [

allow-git = [
"https://github.com/janrueth/boring-rustls-provider",
"https://github.com/howardjohn/tower-hyper-http-body-compat"
]
129 changes: 29 additions & 100 deletions fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ cargo-fuzz = true
[dependencies]
hyper = "1.1"
libfuzzer-sys = "0.4"
prost = "0.12.1"
anyhow = "1.0.65"
prost = "0.13"
anyhow = "1.0"

[dependencies.ztunnel]
path = ".."
Expand Down
2 changes: 1 addition & 1 deletion src/hyper_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ pub fn http2_client() -> client::conn::http2::Builder<TokioExecutor> {

pub fn pooling_client<B>() -> ::hyper_util::client::legacy::Client<HttpConnector, B>
where
B: http_body_1::Body + Send,
B: http_body::Body + Send,
B::Data: Send,
{
::hyper_util::client::legacy::Client::builder(::hyper_util::rt::TokioExecutor::new())
Expand Down
4 changes: 1 addition & 3 deletions src/identity/caclient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ impl CaClient {
secret_ttl: i64,
) -> Result<CaClient, Error> {
let svc = tls::grpc_connector(address, cert_provider.fetch_cert().await?)?;
// let client = IstioCertificateServiceClient::new(svc);
// let svc =
// tower_hyper_http_body_compat::Hyper1HttpServiceAsTowerService03HttpService::new(svc);

let client = IstioCertificateServiceClient::with_interceptor(svc, auth);
Ok(CaClient {
client,
Expand Down
2 changes: 1 addition & 1 deletion src/inpod/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl WorkloadStreamProcessor {
let r = ZdsHello {
version: Version::V1 as i32,
};
self.send_msg(r.clone()).await
self.send_msg(r).await
}

pub async fn send_ack(&mut self) -> std::io::Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion src/state/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ impl TryFrom<&XdsService> for Service {
.iter()
.map(|r| {
xds::istio::workload::load_balancing::Scope::try_from(*r)
.map_err(WorkloadError::DecodeError)
.map_err(WorkloadError::EnumError)
.and_then(|r| r.try_into())
})
.collect::<Result<Vec<LoadBalancerScopes>, WorkloadError>>()?,
Expand Down
2 changes: 2 additions & 0 deletions src/state/workload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,8 @@ pub enum WorkloadError {
MissingGatewayAddress,
#[error("decode error: {0}")]
DecodeError(#[from] prost::DecodeError),
#[error("decode error: {0}")]
EnumError(#[from] prost::UnknownEnumValue),
}

#[cfg(test)]
Expand Down
Loading