Skip to content

Commit 88320b0

Browse files
authored
dependencies: update to tonic 0.12 (#1170)
* dependencies: update to tonic 0.12 Pending hyperium/tonic#1740. DNM until its released. This lets us drop a few shims * Use official * udpate fuzz * copyright * no clone needed
1 parent 15d8561 commit 88320b0

File tree

15 files changed

+452
-498
lines changed

15 files changed

+452
-498
lines changed

Cargo.lock

Lines changed: 306 additions & 358 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ hickory-client = "0.24"
5151
hickory-proto = "0.24"
5252
hickory-resolver = "0.24"
5353
hickory-server = { version = "0.24", features = [ "hickory-resolver" ] }
54-
http-02 = { package = "http", version = "0.2.9" }
55-
http-body-04 = { package = "http-body", version = "0.4" }
56-
http-body-1 = { package = "http-body", version = "1.0.0-rc.2" }
54+
http-body = { package = "http-body", version = "1" }
5755
http-body-util = "0.1"
5856
http-types = { version = "2.12", default-features = false }
5957
hyper = { version = "1.3", features = ["full"] }
@@ -70,8 +68,8 @@ ppp = "2.2"
7068
pprof = { version = "0.13", features = ["protobuf", "protobuf-codec", "criterion"] }
7169
prometheus-client = { version = "0.22" }
7270
prometheus-parse = "0.2"
73-
prost = "0.12"
74-
prost-types = "0.12"
71+
prost = "0.13"
72+
prost-types = "0.13"
7573
rand = "0.8"
7674
rcgen = { version = "0.13", optional = true, features = ["pem"] }
7775
rustls = { version = "0.23", default-features = false }
@@ -87,9 +85,8 @@ tls-listener = { version = "0.10" }
8785
tokio = { version = "1.0", features = ["full", "test-util"] }
8886
tokio-rustls = { version = "0.26", default-features = false }
8987
tokio-stream = { version = "0.1", features = ["net"] }
90-
tonic = { version = "0.11", default-features = false, features = ["prost", "codegen"] }
88+
tonic = { version = "0.12", default-features = false, features = ["prost", "codegen"] }
9189
tower = { version = "0.4", features = ["full"] }
92-
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"] }
9390
tracing = { version = "0.1"}
9491
tracing-subscriber = { version = "0.3", features = ["registry", "env-filter", "json"] }
9592
url = "2.2"
@@ -111,8 +108,8 @@ tokio-util = { version = "0.7.11", features = ["io-util"] }
111108
netns-rs = "0.1"
112109

113110
[build-dependencies]
114-
tonic-build = { version = "0.11", default-features = false, features = ["prost"] }
115-
prost-build = "0.12"
111+
tonic-build = { version = "0.12", default-features = false, features = ["prost"] }
112+
prost-build = "0.13"
116113
anyhow = "1.0"
117114
rustc_version = "0.4"
118115

deny.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,4 @@ skip = [
7474

7575
allow-git = [
7676
"https://github.com/janrueth/boring-rustls-provider",
77-
"https://github.com/howardjohn/tower-hyper-http-body-compat"
7877
]

fuzz/Cargo.lock

Lines changed: 29 additions & 100 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fuzz/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ cargo-fuzz = true
1010
[dependencies]
1111
hyper = "1.1"
1212
libfuzzer-sys = "0.4"
13-
prost = "0.12.1"
14-
anyhow = "1.0.65"
13+
prost = "0.13"
14+
anyhow = "1.0"
1515

1616
[dependencies.ztunnel]
1717
path = ".."

src/hyper_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ pub fn http2_client() -> client::conn::http2::Builder<TokioExecutor> {
155155

156156
pub fn pooling_client<B>() -> ::hyper_util::client::legacy::Client<HttpConnector, B>
157157
where
158-
B: http_body_1::Body + Send,
158+
B: http_body::Body + Send,
159159
B::Data: Send,
160160
{
161161
::hyper_util::client::legacy::Client::builder(::hyper_util::rt::TokioExecutor::new())

src/identity/caclient.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ impl CaClient {
4343
secret_ttl: i64,
4444
) -> Result<CaClient, Error> {
4545
let svc = tls::grpc_connector(address, cert_provider.fetch_cert().await?)?;
46-
// let client = IstioCertificateServiceClient::new(svc);
47-
// let svc =
48-
// tower_hyper_http_body_compat::Hyper1HttpServiceAsTowerService03HttpService::new(svc);
46+
4947
let client = IstioCertificateServiceClient::with_interceptor(svc, auth);
5048
Ok(CaClient {
5149
client,

src/inpod/protocol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl WorkloadStreamProcessor {
4141
let r = ZdsHello {
4242
version: Version::V1 as i32,
4343
};
44-
self.send_msg(r.clone()).await
44+
self.send_msg(r).await
4545
}
4646

4747
pub async fn send_ack(&mut self) -> std::io::Result<()> {

src/state/service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ impl TryFrom<&XdsService> for Service {
215215
.iter()
216216
.map(|r| {
217217
xds::istio::workload::load_balancing::Scope::try_from(*r)
218-
.map_err(WorkloadError::DecodeError)
218+
.map_err(WorkloadError::EnumError)
219219
.and_then(|r| r.try_into())
220220
})
221221
.collect::<Result<Vec<LoadBalancerScopes>, WorkloadError>>()?,

src/state/workload.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,8 @@ pub enum WorkloadError {
683683
MissingGatewayAddress,
684684
#[error("decode error: {0}")]
685685
DecodeError(#[from] prost::DecodeError),
686+
#[error("decode error: {0}")]
687+
EnumError(#[from] prost::UnknownEnumValue),
686688
}
687689

688690
#[cfg(test)]

0 commit comments

Comments
 (0)