Skip to content

Commit

Permalink
chore(deps): upgrade to hyper 1.x
Browse files Browse the repository at this point in the history
note: this commit will not compile, code changes are intentionally
elided from this commit.

this commit upgrades hyper, http, tonic, prost, related dependencies,
and their assorted cargo features.

see <linkerd/linkerd2#8733>.

see also:

* #3379
* #3380
* #3382
* #3405
* hyperium/hyper#3796
* #3411
* #3421
* #3427
* #3428
* #3432
* #3433
* #3444
* #3445
* #3454
* #3455
* #3456
* #3457
* #3461
* #3459
* #3465
* #3466
* #3467
* #3468
* linkerd/linkerd2-proxy-api#421
* linkerd/linkerd2#13492
* linkerd/linkerd2#13493
* hyperium/hyper#3816
* #3472
* #3473
* #3479
* tokio-rs/tokio#7059
* #3509
* hyperium/http-body#140
* #3515
* hyperium/http-body#141
* #3530
* #3531
* #3540
* #3556
* #3558
* #3559
* #3564
* #3567
* #3573
* #3583
* hyperium/http-body#144
* #3585
* #3586
* #3597
* #3598
* #3611
* #3614
* #3615
* #3616
* #3647
* #3651
* #3653
* #3654
* #3655
* #3656
* #3657
* #3660
* #3671
* #3672
* #3673
* #3676
* hyperium/http-body#147
* #3692
* #3699
* #3700
* #3701
* #3708
* linkerd/drain-rs#36
* #3715
* #3717
* eminence/procfs#340

---

squash:

chore(deps): add hyper-util workspace dependency

chore(deps): add http-body-util workspace dependency

chore(deps): upgrade linkerd2-proxy-api

this commit represents main as of linkerd/linkerd2-proxy-api#421.

Signed-off-by: katelyn martin <[email protected]>
  • Loading branch information
cratelyn committed Mar 11, 2025
1 parent f5dae03 commit b6af8db
Show file tree
Hide file tree
Showing 17 changed files with 465 additions and 294 deletions.
658 changes: 404 additions & 254 deletions Cargo.lock

Large diffs are not rendered by default.

58 changes: 41 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,24 +102,48 @@ lto = true
[workspace.dependencies]
bytes = { version = "1" }
drain = { version = "0.1", default-features = false }
h2 = { version = "0.3" }
http = { version = "0.2" }
http-body = { version = "0.4" }
hyper = { version = "0.14.32", default-features = false }
prost = { version = "0.12" }
prost-build = { version = "0.12", default-features = false }
prost-types = { version = "0.12" }
tokio-rustls = { version = "0.26", default-features = false, features = [
"ring",
"logging",
] }
tonic = { version = "0.10", default-features = false }
tonic-build = { version = "0.10", default-features = false }
tower = { version = "0.4.13", default-features = false }
h2 = { version = "0.4" }
http = { version = "1" }
http-body = { version = "1" }
hyper = { version = "1", default-features = false }
hyper-util = { version = "0.1", default-features = false }
prost = { version = "0.13" }
prost-build = { version = "0.13", default-features = false }
prost-types = { version = "0.13" }
tonic = { version = "0.12", default-features = false }
tonic-build = { version = "0.12", default-features = false }
tower = { version = "0.4", default-features = false }
tower-service = { version = "0.3" }
tower-test = { version = "0.4" }

[workspace.dependencies.http-body-util]
version = "0.1"
default-features = false
features = ["channel"]

[workspace.dependencies.tokio-rustls]
version = "0.26"
default-features = false
features = ["logging", "ring"]

# Temporarily patch `drain`. When linkerd/drain-rs#36 is released, this can
# be removed.
[patch.crates-io.drain]
git = "https://github.com/linkerd/drain-rs.git"
rev = "7678cbbf822c922fefa5c8c62070f52bea385fc9"
# https://github.com/linkerd/drain-rs/commit/7678cbbf822c922fefa5c8c62070f52bea385fc9

# Temporarily patch `http-body` and its sibling `http-body-util`, using a
# fork in the `linkerd` Github oranization. When hyperium/http-body#140 and
# hyperium/http-body#140 have been released, this can be removed.
[patch.crates-io.http-body]
git = "https://github.com/linkerd/http-body.git"
rev = "c86632ea5c869f28701b8de386e5c19b4388462b"
[patch.crates-io.http-body-util]
git = "https://github.com/linkerd/http-body.git"
rev = "c86632ea5c869f28701b8de386e5c19b4388462b"

[workspace.dependencies.linkerd2-proxy-api]
version = "0.15.0"
# git = "https://github.com/linkerd/linkerd2-proxy-api.git"
# branch = "main"
git = "https://github.com/linkerd/linkerd2-proxy-api.git"
rev = "981369a18918ce5570b2d49c329eca55ae831e87"
# https://github.com/linkerd/linkerd2-proxy-api/commit/981369a18918ce5570b2d49c329eca55ae831e87
2 changes: 1 addition & 1 deletion hyper-balance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ publish = false
futures = { version = "0.3", default-features = false }
http = { workspace = true }
http-body = { workspace = true }
hyper = { workspace = true, features = ["deprecated"] }
hyper = { workspace = true }
pin-project = "1"
tower = { workspace = true, default-features = false, features = ["load"] }
tokio = { version = "1", features = ["macros"] }
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/admin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bytes = { workspace = true }
deflate = { version = "1", optional = true, features = ["gzip"] }
http = { workspace = true }
http-body = { workspace = true }
hyper = { workspace = true, features = ["deprecated", "http1", "http2"] }
hyper = { workspace = true, features = ["http1", "http2"] }
futures = { version = "0.3", default-features = false }
pprof = { version = "0.14", optional = true, features = ["prost-codec"] }
serde = "1"
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bytes = { workspace = true }
drain = { workspace = true, features = ["retain"] }
http = { workspace = true }
http-body = { workspace = true }
hyper = { workspace = true, features = ["deprecated", "http1", "http2"] }
hyper = { workspace = true, features = ["http1", "http2"] }
futures = { version = "0.3", default-features = false }
ipnet = "2.11"
prometheus-client = "0.22"
Expand Down
4 changes: 2 additions & 2 deletions linkerd/app/inbound/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ path = "../../proxy/server-policy"
features = ["proto"]

[target.'cfg(fuzzing)'.dependencies]
hyper = { workspace = true, features = ["deprecated", "http1", "http2"] }
hyper = { workspace = true, features = ["http1", "http2"] }
linkerd-app-test = { path = "../test" }
arbitrary = { version = "1", features = ["derive"] }
libfuzzer-sys = { version = "0.4", features = ["arbitrary-derive"] }
Expand All @@ -54,7 +54,7 @@ linkerd-meshtls-rustls = { path = "../../meshtls/rustls", features = [
] }

[dev-dependencies]
hyper = { workspace = true, features = ["deprecated", "http1", "http2"] }
hyper = { workspace = true, features = ["http1", "http2"] }
linkerd-app-test = { path = "../test" }
linkerd-http-body-compat = { path = "../../http/body-compat" }
linkerd-http-metrics = { path = "../../http/metrics", features = ["test-util"] }
Expand Down
3 changes: 0 additions & 3 deletions linkerd/app/integration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ h2 = { workspace = true }
http = { workspace = true }
http-body = { workspace = true }
hyper = { workspace = true, features = [
"backports",
"deprecated",
"http1",
"http2",
"stream",
"client",
"server",
] }
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/outbound/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ linkerd-tonic-watch = { path = "../../tonic-watch" }
[dev-dependencies]
futures-util = "0.3"
http-body = { workspace = true }
hyper = { workspace = true, features = ["backports", "deprecated", "http1", "http2"] }
hyper = { workspace = true, features = ["http1", "http2"] }
tokio = { version = "1", features = ["macros", "sync", "time"] }
tokio-rustls = { workspace = true }
tokio-test = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ futures = { version = "0.3", default-features = false }
h2 = { workspace = true }
http = { workspace = true }
http-body = { workspace = true }
hyper = { workspace = true, features = ["deprecated", "http1", "http2"] }
hyper = { workspace = true, features = ["http1", "http2"] }
linkerd-app-core = { path = "../core" }
linkerd-http-route = { path = "../../http/route", optional = true }
linkerd-identity = { path = "../../identity" }
Expand Down
2 changes: 1 addition & 1 deletion linkerd/http/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ HTTP runtime components for Linkerd.
"""

[dependencies]
hyper = { workspace = true, features = ["deprecated"] }
hyper = { workspace = true }
tokio = { version = "1", features = ["rt"] }
tracing = "0.1"
2 changes: 1 addition & 1 deletion linkerd/http/metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bytes = { workspace = true }
futures = { version = "0.3", default-features = false }
http = { workspace = true }
http-body = { workspace = true }
hyper = { workspace = true, features = ["deprecated", "http1", "http2"] }
hyper = { workspace = true, features = ["http1", "http2"] }
parking_lot = "0.12"
pin-project = "1"
tokio = { version = "1", features = ["time"] }
Expand Down
2 changes: 1 addition & 1 deletion linkerd/http/retry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ linkerd-metrics = { path = "../../metrics" }
linkerd-stack = { path = "../../stack" }

[dev-dependencies]
hyper = { workspace = true, features = ["deprecated"] }
hyper = { workspace = true }
linkerd-tracing = { path = "../../tracing", features = ["ansi"] }
linkerd-mock-http-body = { path = "../../mock/http-body" }
tokio = { version = "1", features = ["macros", "rt"] }
7 changes: 7 additions & 0 deletions linkerd/http/retry/src/replay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,13 @@ where
return Poll::Ready(Some(Err(Capped.into())));
}
}
if this.replay_trailers {
this.replay_trailers = false;
if let Some(ref trailers) = state.trailers {
tracing::trace!("Replaying trailers");
return Poll::Ready(Some(Ok(Frame::trailers(trailers.clone()))));
}
}

// If the inner body has previously ended, don't poll it again.
//
Expand Down
5 changes: 1 addition & 4 deletions linkerd/http/upgrade/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ drain = { workspace = true }
futures = { version = "0.3", default-features = false }
http = { workspace = true }
http-body = { workspace = true }
hyper = { workspace = true, default-features = false, features = [
"deprecated",
"client",
] }
hyper = { workspace = true, default-features = false, features = ["client"] }
pin-project = "1"
thiserror = "2"
tokio = { version = "1", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion linkerd/metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test_util = []
deflate = { version = "1", features = ["gzip"] }
http = { workspace = true }
http-body = { workspace = true }
hyper = { workspace = true, features = ["deprecated", "http1", "http2"] }
hyper = { workspace = true, features = ["http1", "http2"] }
linkerd-http-box = { path = "../http/box" }
linkerd-stack = { path = "../stack", optional = true }
linkerd-system = { path = "../system", optional = true }
Expand Down
4 changes: 0 additions & 4 deletions linkerd/proxy/http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@ http = { workspace = true }
http-body = { workspace = true }
httparse = "1"
hyper = { workspace = true, features = [
"backports",
"client",
"deprecated",
"http1",
"http2",
"server",
"stream",
"runtime",
] }
hyper-balance = { path = "../../../hyper-balance" }
parking_lot = "0.12"
Expand Down
2 changes: 1 addition & 1 deletion linkerd/proxy/tap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ publish = false
bytes = { workspace = true }
http = { workspace = true }
http-body = { workspace = true }
hyper = { workspace = true, features = ["backports", "deprecated", "http1", "http2"] }
hyper = { workspace = true, features = ["http1", "http2"] }
futures = { version = "0.3", default-features = false }
ipnet = "2.11"
linkerd2-proxy-api = { workspace = true, features = ["tap"] }
Expand Down

0 comments on commit b6af8db

Please sign in to comment.