From be7f31e7a1b197f8f49eb0161a53f3d056657fb1 Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Wed, 1 Jan 2025 00:00:00 +0000 Subject: [PATCH 01/14] chore(deps): upgrade to hyper 1.x 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 . Signed-off-by: katelyn martin --- Cargo.lock | 732 ++++++++++++++++++----------- Cargo.toml | 16 +- hyper-balance/Cargo.toml | 2 +- linkerd/app/admin/Cargo.toml | 2 +- linkerd/app/core/Cargo.toml | 2 +- linkerd/app/inbound/Cargo.toml | 4 +- linkerd/app/integration/Cargo.toml | 3 - linkerd/app/outbound/Cargo.toml | 2 +- linkerd/app/test/Cargo.toml | 2 +- linkerd/http/executor/Cargo.toml | 2 +- linkerd/http/metrics/Cargo.toml | 2 +- linkerd/http/retry/Cargo.toml | 2 +- linkerd/http/upgrade/Cargo.toml | 5 +- linkerd/metrics/Cargo.toml | 2 +- linkerd/proxy/http/Cargo.toml | 4 - linkerd/proxy/tap/Cargo.toml | 2 +- 16 files changed, 473 insertions(+), 311 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a6f8dbf5fc..4ad379f3c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,19 +4,13 @@ version = 4 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -147,6 +141,12 @@ dependencies = [ "syn", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.4.0" @@ -155,18 +155,17 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" -version = "0.6.20" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", - "http", - "http-body", - "hyper", + "http 1.2.0", + "http-body 1.0.1", + "http-body-util", "itoa", "matchit", "memchr", @@ -176,41 +175,44 @@ dependencies = [ "rustversion", "serde", "sync_wrapper", - "tower", + "tower 0.5.2", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper", "tower-layer", "tower-service", ] [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -227,9 +229,9 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bindgen" @@ -237,10 +239,10 @@ version = "0.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.8.0", "cexpr", "clang-sys", - "itertools", + "itertools 0.13.0", "proc-macro2", "quote", "regex", @@ -257,9 +259,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "block-buffer" @@ -276,7 +278,7 @@ version = "4.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f5aac023c3ba13725de1604aff621a9dbf9a4f3af1ea6fb712bca91ad729a8e" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.8.0", "boring-sys", "foreign-types", "libc", @@ -485,7 +487,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d105028bd2b5dfcb33318fd79a445001ead36004dd8dffef1bdd7e493d8bc1e" dependencies = [ "tokio", - "tower", + "tower 0.4.13", ] [[package]] @@ -502,9 +504,9 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "enum-as-inner" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" dependencies = [ "heck", "proc-macro2", @@ -545,7 +547,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -579,7 +581,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -758,9 +760,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -806,7 +808,26 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.12", + "indexmap 2.7.1", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.2.0", "indexmap 2.7.1", "slab", "tokio", @@ -828,9 +849,9 @@ checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -902,9 +923,20 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -918,7 +950,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.2.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.2.0", + "http-body 1.0.1", "pin-project-lite", ] @@ -942,25 +997,22 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.32" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.4.7", + "http 1.2.0", + "http-body 1.0.1", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] @@ -969,25 +1021,45 @@ name = "hyper-balance" version = "0.1.0" dependencies = [ "futures", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "hyper", "pin-project", "tokio", "tokio-test", - "tower", + "tower 0.4.13", ] [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ + "hyper", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.2.0", + "http-body 1.0.1", "hyper", "pin-project-lite", + "socket2", "tokio", - "tokio-io-timeout", + "tower-service", + "tracing", ] [[package]] @@ -1176,6 +1248,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.14" @@ -1213,10 +1294,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1261,7 +1343,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -1274,7 +1356,7 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" name = "linkerd-addr" version = "0.1.0" dependencies = [ - "http", + "http 1.2.0", "ipnet", "linkerd-dns-name", "thiserror 2.0.11", @@ -1299,8 +1381,8 @@ dependencies = [ "thiserror 2.0.11", "tokio", "tokio-stream", - "tonic", - "tower", + "tonic 0.12.3", + "tower 0.4.13", "tracing", ] @@ -1311,8 +1393,8 @@ dependencies = [ "bytes", "deflate", "futures", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "hyper", "linkerd-app-core", "linkerd-app-inbound", @@ -1322,7 +1404,7 @@ dependencies = [ "serde_json", "thiserror 2.0.11", "tokio", - "tower", + "tower 0.4.13", "tracing", ] @@ -1333,8 +1415,8 @@ dependencies = [ "bytes", "drain", "futures", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "hyper", "ipnet", "linkerd-addr", @@ -1389,8 +1471,8 @@ dependencies = [ "thiserror 2.0.11", "tokio", "tokio-stream", - "tonic", - "tower", + "tonic 0.12.3", + "tower 0.4.13", "tracing", ] @@ -1399,7 +1481,7 @@ name = "linkerd-app-gateway" version = "0.1.0" dependencies = [ "futures", - "http", + "http 1.2.0", "linkerd-app-core", "linkerd-app-inbound", "linkerd-app-outbound", @@ -1410,8 +1492,8 @@ dependencies = [ "thiserror 2.0.11", "tokio", "tokio-test", - "tonic", - "tower", + "tonic 0.12.3", + "tower 0.4.13", "tower-test", "tracing", ] @@ -1423,7 +1505,7 @@ dependencies = [ "arbitrary", "bytes", "futures", - "http", + "http 1.2.0", "hyper", "libfuzzer-sys", "linkerd-app-core", @@ -1446,8 +1528,8 @@ dependencies = [ "thiserror 2.0.11", "tokio", "tokio-test", - "tonic", - "tower", + "tonic 0.12.3", + "tower 0.4.13", "tracing", ] @@ -1458,9 +1540,9 @@ dependencies = [ "bytes", "flate2", "futures", - "h2", - "http", - "http-body", + "h2 0.4.7", + "http 1.2.0", + "http-body 1.0.1", "hyper", "ipnet", "linkerd-app", @@ -1480,8 +1562,8 @@ dependencies = [ "tokio", "tokio-rustls", "tokio-stream", - "tonic", - "tower", + "tonic 0.12.3", + "tower 0.4.13", "tracing", "tracing-subscriber", ] @@ -1494,8 +1576,8 @@ dependencies = [ "bytes", "futures", "futures-util", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "hyper", "linkerd-app-core", "linkerd-app-test", @@ -1525,8 +1607,8 @@ dependencies = [ "tokio", "tokio-rustls", "tokio-test", - "tonic", - "tower", + "tonic 0.12.3", + "tower 0.4.13", "tower-test", "tracing", ] @@ -1536,9 +1618,9 @@ name = "linkerd-app-test" version = "0.1.0" dependencies = [ "futures", - "h2", - "http", - "http-body", + "h2 0.4.7", + "http 1.2.0", + "http-body 1.0.1", "hyper", "linkerd-app-core", "linkerd-http-route", @@ -1552,8 +1634,8 @@ dependencies = [ "tokio", "tokio-stream", "tokio-test", - "tonic", - "tower", + "tonic 0.12.3", + "tower 0.4.13", "tracing", "tracing-subscriber", ] @@ -1573,7 +1655,7 @@ dependencies = [ "linkerd-stack", "thiserror 2.0.11", "tokio", - "tower", + "tower 0.4.13", "tracing", ] @@ -1663,7 +1745,7 @@ name = "linkerd-http-access-log" version = "0.1.0" dependencies = [ "futures-core", - "http", + "http 1.2.0", "humantime", "linkerd-identity", "linkerd-proxy-transport", @@ -1681,8 +1763,8 @@ version = "0.1.0" dependencies = [ "bytes", "futures", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "linkerd-error", "linkerd-stack", "pin-project", @@ -1693,8 +1775,8 @@ name = "linkerd-http-classify" version = "0.1.0" dependencies = [ "futures", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "linkerd-error", "linkerd-http-box", "linkerd-stack", @@ -1724,10 +1806,10 @@ name = "linkerd-http-insert" version = "0.1.0" dependencies = [ "futures", - "http", + "http 1.2.0", "linkerd-stack", "pin-project", - "tower", + "tower 0.4.13", ] [[package]] @@ -1736,8 +1818,8 @@ version = "0.1.0" dependencies = [ "bytes", "futures", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "hyper", "linkerd-error", "linkerd-http-classify", @@ -1746,7 +1828,7 @@ dependencies = [ "parking_lot", "pin-project", "tokio", - "tower", + "tower 0.4.13", "tracing", ] @@ -1754,9 +1836,9 @@ dependencies = [ name = "linkerd-http-override-authority" version = "0.1.0" dependencies = [ - "http", + "http 1.2.0", "linkerd-stack", - "tower", + "tower 0.4.13", "tracing", ] @@ -1766,8 +1848,8 @@ version = "0.1.0" dependencies = [ "bytes", "futures", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "linkerd-error", "linkerd-http-box", "linkerd-metrics", @@ -1783,11 +1865,11 @@ dependencies = [ name = "linkerd-http-retain" version = "0.1.0" dependencies = [ - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "linkerd-stack", "pin-project", - "tower", + "tower 0.4.13", ] [[package]] @@ -1796,8 +1878,8 @@ version = "0.1.0" dependencies = [ "bytes", "futures", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "hyper", "linkerd-error", "linkerd-exp-backoff", @@ -1809,7 +1891,7 @@ dependencies = [ "pin-project", "thiserror 2.0.11", "tokio", - "tower", + "tower 0.4.13", "tracing", ] @@ -1817,7 +1899,7 @@ dependencies = [ name = "linkerd-http-route" version = "0.1.0" dependencies = [ - "http", + "http 1.2.0", "linkerd2-proxy-api", "maplit", "rand", @@ -1832,8 +1914,8 @@ name = "linkerd-http-stream-timeouts" version = "0.1.0" dependencies = [ "futures", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "linkerd-error", "linkerd-stack", "parking_lot", @@ -1850,8 +1932,8 @@ dependencies = [ "bytes", "drain", "futures", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "hyper", "linkerd-duplex", "linkerd-error", @@ -1862,7 +1944,7 @@ dependencies = [ "pin-project", "thiserror 2.0.11", "tokio", - "tower", + "tower 0.4.13", "tracing", "try-lock", ] @@ -1871,7 +1953,7 @@ dependencies = [ name = "linkerd-http-variant" version = "0.1.0" dependencies = [ - "http", + "http 1.2.0", "thiserror 2.0.11", ] @@ -1898,7 +1980,7 @@ dependencies = [ "linkerd-tracing", "parking_lot", "tokio", - "tower", + "tower 0.4.13", "tracing", ] @@ -1998,8 +2080,8 @@ name = "linkerd-metrics" version = "0.1.0" dependencies = [ "deflate", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "hyper", "linkerd-http-box", "linkerd-stack", @@ -2020,15 +2102,15 @@ name = "linkerd-opencensus" version = "0.1.0" dependencies = [ "futures", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "linkerd-error", "linkerd-metrics", "linkerd-trace-context", "opencensus-proto", "tokio", "tokio-stream", - "tonic", + "tonic 0.12.3", "tracing", ] @@ -2037,8 +2119,8 @@ name = "linkerd-opentelemetry" version = "0.1.0" dependencies = [ "futures", - "http", - "http-body", + "http 0.2.12", + "http-body 1.0.1", "linkerd-error", "linkerd-metrics", "linkerd-trace-context", @@ -2047,7 +2129,7 @@ dependencies = [ "opentelemetry_sdk", "tokio", "tokio-stream", - "tonic", + "tonic 0.12.3", "tracing", ] @@ -2091,7 +2173,7 @@ dependencies = [ "rand", "tokio", "tokio-test", - "tower", + "tower 0.4.13", "tower-test", "tracing", ] @@ -2101,8 +2183,8 @@ name = "linkerd-proxy-api-resolve" version = "0.1.0" dependencies = [ "futures", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "linkerd-addr", "linkerd-error", "linkerd-http-h2", @@ -2113,9 +2195,9 @@ dependencies = [ "linkerd-tonic-stream", "linkerd2-proxy-api", "pin-project", - "prost", - "tonic", - "tower", + "prost 0.13.4", + "tonic 0.12.3", + "tower 0.4.13", "tracing", ] @@ -2133,7 +2215,7 @@ dependencies = [ "linkerd-stack", "rand", "tokio", - "tower", + "tower 0.4.13", "tracing", ] @@ -2174,7 +2256,7 @@ name = "linkerd-proxy-client-policy" version = "0.1.0" dependencies = [ "ahash", - "http", + "http 1.2.0", "ipnet", "linkerd-error", "linkerd-exp-backoff", @@ -2186,10 +2268,10 @@ dependencies = [ "linkerd2-proxy-api", "maplit", "once_cell", - "prost-types", + "prost-types 0.13.4", "quickcheck", "thiserror 2.0.11", - "tonic", + "tonic 0.12.3", ] [[package]] @@ -2198,7 +2280,7 @@ version = "0.1.0" dependencies = [ "futures", "linkerd-error", - "tower", + "tower 0.4.13", ] [[package]] @@ -2213,7 +2295,7 @@ dependencies = [ "linkerd-stack", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tracing", ] @@ -2225,9 +2307,9 @@ dependencies = [ "bytes", "drain", "futures", - "h2", - "http", - "http-body", + "h2 0.4.7", + "http 1.2.0", + "http-body 1.0.1", "httparse", "hyper", "hyper-balance", @@ -2254,7 +2336,7 @@ dependencies = [ "thiserror 2.0.11", "tokio", "tokio-test", - "tower", + "tower 0.4.13", "tower-test", "tracing", "try-lock", @@ -2265,7 +2347,7 @@ name = "linkerd-proxy-identity-client" version = "0.1.0" dependencies = [ "futures", - "http-body", + "http-body 1.0.1", "linkerd-dns-name", "linkerd-error", "linkerd-identity", @@ -2276,7 +2358,7 @@ dependencies = [ "pin-project", "thiserror 2.0.11", "tokio", - "tonic", + "tonic 0.12.3", "tracing", ] @@ -2289,7 +2371,7 @@ dependencies = [ "linkerd-proxy-core", "pin-project", "thiserror 2.0.11", - "tower", + "tower 0.4.13", "tracing", ] @@ -2298,13 +2380,13 @@ name = "linkerd-proxy-server-policy" version = "0.1.0" dependencies = [ "governor", - "http", + "http 1.2.0", "ipnet", "linkerd-http-route", "linkerd-identity", "linkerd2-proxy-api", "maplit", - "prost-types", + "prost-types 0.13.4", "quickcheck", "thiserror 2.0.11", "tokio", @@ -2327,8 +2409,8 @@ dependencies = [ "thiserror 2.0.11", "tokio", "tokio-test", - "tonic", - "tower", + "tonic 0.12.3", + "tower 0.4.13", "tracing", "x509-parser", ] @@ -2339,8 +2421,8 @@ version = "0.1.0" dependencies = [ "bytes", "futures", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "hyper", "ipnet", "linkerd-conditional", @@ -2353,13 +2435,13 @@ dependencies = [ "linkerd2-proxy-api", "parking_lot", "pin-project", - "prost-types", + "prost-types 0.13.4", "quickcheck", "rand", "thiserror 2.0.11", "tokio", - "tonic", - "tower", + "tonic 0.12.3", + "tower 0.4.13", "tracing", ] @@ -2375,7 +2457,7 @@ dependencies = [ "pin-project", "rand", "tokio", - "tower", + "tower 0.4.13", ] [[package]] @@ -2406,7 +2488,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-test", - "tower", + "tower 0.4.13", "tower-test", "tracing", ] @@ -2418,7 +2500,7 @@ dependencies = [ "futures", "linkerd-error", "linkerd-stack", - "tower", + "tower 0.4.13", "tracing", ] @@ -2441,8 +2523,8 @@ version = "0.1.0" dependencies = [ "bytes", "futures", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", "linkerd-addr", "linkerd-dns-name", "linkerd-error", @@ -2453,14 +2535,14 @@ dependencies = [ "linkerd-tonic-watch", "linkerd2-proxy-api", "once_cell", - "prost-types", + "prost-types 0.13.4", "quickcheck", "regex", "thiserror 2.0.11", "tokio", "tokio-stream", - "tonic", - "tower", + "tonic 0.12.3", + "tower 0.4.13", "tracing", ] @@ -2485,7 +2567,7 @@ dependencies = [ "tokio", "tokio-test", "tokio-util", - "tower", + "tower 0.4.13", "tower-test", "tracing", ] @@ -2498,7 +2580,7 @@ dependencies = [ "parking_lot", "tokio", "tokio-test", - "tower", + "tower 0.4.13", "tower-test", ] @@ -2509,7 +2591,7 @@ dependencies = [ "futures", "linkerd-error", "linkerd-stack", - "tower", + "tower 0.4.13", "tracing", ] @@ -2539,7 +2621,7 @@ dependencies = [ "pin-project", "thiserror 2.0.11", "tokio", - "tower", + "tower 0.4.13", "tracing", "untrusted", ] @@ -2572,7 +2654,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-test", - "tonic", + "tonic 0.12.3", "tracing", ] @@ -2587,7 +2669,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-test", - "tonic", + "tonic 0.12.3", "tower-test", "tracing", ] @@ -2600,12 +2682,12 @@ dependencies = [ "bytes", "futures", "hex", - "http", + "http 1.2.0", "linkerd-error", "linkerd-stack", "rand", "thiserror 1.0.69", - "tower", + "tower 0.4.13", "tracing", ] @@ -2635,8 +2717,8 @@ dependencies = [ "linkerd-error", "linkerd-io", "linkerd-stack", - "prost", - "prost-build", + "prost 0.13.4", + "prost-build 0.12.6", "tokio", "tokio-test", "tracing", @@ -2679,14 +2761,14 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4682c00263191a5bfa4fbe64f6d80b22ff2b49aaa294da5aac062f5abc6eb9e" dependencies = [ - "h2", - "http", + "h2 0.3.26", + "http 0.2.12", "ipnet", - "prost", - "prost-types", + "prost 0.12.6", + "prost-types 0.12.6", "quickcheck", "thiserror 1.0.69", - "tonic", + "tonic 0.10.2", ] [[package]] @@ -2782,18 +2864,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" dependencies = [ "adler2", ] @@ -2931,9 +3004,9 @@ name = "opencensus-proto" version = "0.1.0" dependencies = [ "bytes", - "prost", - "prost-types", - "tonic", + "prost 0.13.4", + "prost-types 0.13.4", + "tonic 0.12.3", "tonic-build", ] @@ -2968,8 +3041,8 @@ version = "0.1.0" dependencies = [ "opentelemetry", "opentelemetry_sdk", - "prost", - "tonic", + "prost 0.13.4", + "tonic 0.12.3", "tonic-build", ] @@ -3014,7 +3087,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.0", + "windows-targets 0.52.6", ] [[package]] @@ -3023,7 +3096,7 @@ version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" dependencies = [ - "base64 0.22.0", + "base64 0.22.1", "serde", ] @@ -3102,9 +3175,9 @@ dependencies = [ "nix", "once_cell", "parking_lot", - "prost", - "prost-build", - "prost-derive", + "prost 0.12.6", + "prost-build 0.12.6", + "prost-derive 0.12.6", "sha2", "smallvec", "symbolic-demangle", @@ -3146,7 +3219,7 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc5b72d8145275d844d4b5f6d4e1eef00c8cd889edb6035c21675d1bb1f45c9f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.8.0", "hex", "procfs-core", "rustix", @@ -3158,7 +3231,7 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "239df02d8349b06fc07398a3a1697b06418223b1c7725085e801e7c0fc6a12ec" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.8.0", "hex", ] @@ -3192,7 +3265,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.12.6", +] + +[[package]] +name = "prost" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec" +dependencies = [ + "bytes", + "prost-derive 0.13.4", ] [[package]] @@ -3203,14 +3286,34 @@ checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" dependencies = [ "bytes", "heck", - "itertools", + "itertools 0.12.1", "log", "multimap", "once_cell", "petgraph", "prettyplease", - "prost", - "prost-types", + "prost 0.12.6", + "prost-types 0.12.6", + "regex", + "syn", + "tempfile", +] + +[[package]] +name = "prost-build" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f3e5beed80eb580c68e2c600937ac2c4eedabdfd5ef1e5b7ea4f3fba84497b" +dependencies = [ + "heck", + "itertools 0.13.0", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost 0.13.4", + "prost-types 0.13.4", "regex", "syn", "tempfile", @@ -3223,7 +3326,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "prost-derive" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" +dependencies = [ + "anyhow", + "itertools 0.13.0", "proc-macro2", "quote", "syn", @@ -3235,7 +3351,16 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ - "prost", + "prost 0.12.6", +] + +[[package]] +name = "prost-types" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2f1e56baa61e93533aebc21af4d2134b70f66275e0fcdf3cbe43d77ff7e8fc" +dependencies = [ + "prost 0.13.4", ] [[package]] @@ -3313,11 +3438,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.8.0", ] [[package]] @@ -3328,7 +3453,7 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -3343,9 +3468,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -3416,11 +3541,11 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.8.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3597,9 +3722,9 @@ name = "spiffe-proto" version = "0.1.0" dependencies = [ "bytes", - "prost", - "prost-types", - "tonic", + "prost 0.13.4", + "prost-types 0.13.4", + "tonic 0.12.3", "tonic-build", ] @@ -3666,9 +3791,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" [[package]] name = "synstructure" @@ -3692,7 +3817,7 @@ dependencies = [ "getrandom", "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3841,16 +3966,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.5.0" @@ -3927,23 +4042,47 @@ name = "tonic" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" +dependencies = [ + "async-trait", + "base64 0.21.7", + "bytes", + "http 0.2.12", + "http-body 0.4.6", + "percent-encoding", + "pin-project", + "prost 0.12.6", + "tokio", + "tokio-stream", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.7", + "base64 0.22.1", "bytes", - "h2", - "http", - "http-body", + "h2 0.4.7", + "http 1.2.0", + "http-body 1.0.1", + "http-body-util", "hyper", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", - "prost", + "prost 0.13.4", + "socket2", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -3951,13 +4090,14 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.10.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" dependencies = [ "prettyplease", "proc-macro2", - "prost-build", + "prost-build 0.13.4", + "prost-types 0.13.4", "quote", "syn", ] @@ -3989,6 +4129,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -4061,9 +4215,9 @@ dependencies = [ [[package]] name = "tracing-serde" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" dependencies = [ "serde", "tracing-core", @@ -4071,9 +4225,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -4173,9 +4327,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", @@ -4184,13 +4338,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -4199,9 +4352,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4209,9 +4362,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -4222,9 +4375,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "widestring" @@ -4269,7 +4425,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -4289,17 +4454,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -4310,9 +4476,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -4322,9 +4488,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -4334,9 +4500,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -4346,9 +4518,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -4358,9 +4530,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -4370,9 +4542,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -4382,9 +4554,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winreg" diff --git a/Cargo.toml b/Cargo.toml index 30c3d87e21..baad45ab6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -98,18 +98,18 @@ lto = true [workspace.dependencies] bytes = { version = "1" } -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-types = { version = "0.12" } +h2 = { version = "0.4" } +http = { version = "1" } +http-body = { version = "1" } +hyper = { version = "1", default-features = false } +prost = { version = "0.13" } +prost-types = { version = "0.13" } 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 } +tonic = { version = "0.12", default-features = false } +tonic-build = { version = "0.12", default-features = false } [workspace.dependencies.linkerd2-proxy-api] version = "0.15.0" diff --git a/hyper-balance/Cargo.toml b/hyper-balance/Cargo.toml index 110d9707b1..e985266eb2 100644 --- a/hyper-balance/Cargo.toml +++ b/hyper-balance/Cargo.toml @@ -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 = { version = "0.4", default-features = false, features = ["load"] } tokio = { version = "1", features = ["macros"] } diff --git a/linkerd/app/admin/Cargo.toml b/linkerd/app/admin/Cargo.toml index a800578bd1..c5a7dfe33b 100644 --- a/linkerd/app/admin/Cargo.toml +++ b/linkerd/app/admin/Cargo.toml @@ -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" diff --git a/linkerd/app/core/Cargo.toml b/linkerd/app/core/Cargo.toml index 01a57ec1c3..6a78ef1529 100644 --- a/linkerd/app/core/Cargo.toml +++ b/linkerd/app/core/Cargo.toml @@ -17,7 +17,7 @@ bytes = { workspace = true } drain = { version = "0.1", 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" diff --git a/linkerd/app/inbound/Cargo.toml b/linkerd/app/inbound/Cargo.toml index 46d849353c..9d0d2c84ca 100644 --- a/linkerd/app/inbound/Cargo.toml +++ b/linkerd/app/inbound/Cargo.toml @@ -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"] } @@ -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-metrics = { path = "../../http/metrics", features = ["test-util"] } linkerd-idle-cache = { path = "../../idle-cache", features = ["test-util"] } diff --git a/linkerd/app/integration/Cargo.toml b/linkerd/app/integration/Cargo.toml index 6b615ede73..93bf3547b2 100644 --- a/linkerd/app/integration/Cargo.toml +++ b/linkerd/app/integration/Cargo.toml @@ -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", ] } diff --git a/linkerd/app/outbound/Cargo.toml b/linkerd/app/outbound/Cargo.toml index cfa7103d60..f7b36067a6 100644 --- a/linkerd/app/outbound/Cargo.toml +++ b/linkerd/app/outbound/Cargo.toml @@ -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" diff --git a/linkerd/app/test/Cargo.toml b/linkerd/app/test/Cargo.toml index a58afcef7e..babc2a38e3 100644 --- a/linkerd/app/test/Cargo.toml +++ b/linkerd/app/test/Cargo.toml @@ -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" } diff --git a/linkerd/http/executor/Cargo.toml b/linkerd/http/executor/Cargo.toml index ef75f18f6a..4922ed2937 100644 --- a/linkerd/http/executor/Cargo.toml +++ b/linkerd/http/executor/Cargo.toml @@ -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" diff --git a/linkerd/http/metrics/Cargo.toml b/linkerd/http/metrics/Cargo.toml index 02c1e87a88..6ccc7e19a3 100644 --- a/linkerd/http/metrics/Cargo.toml +++ b/linkerd/http/metrics/Cargo.toml @@ -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"] } diff --git a/linkerd/http/retry/Cargo.toml b/linkerd/http/retry/Cargo.toml index 09e15bd356..bd7655c953 100644 --- a/linkerd/http/retry/Cargo.toml +++ b/linkerd/http/retry/Cargo.toml @@ -25,6 +25,6 @@ linkerd-metrics = { path = "../../metrics" } linkerd-stack = { path = "../../stack" } [dev-dependencies] -hyper = { workspace = true, features = ["deprecated"] } +hyper = { workspace = true } linkerd-tracing = { path = "../../tracing", features = ["ansi"] } tokio = { version = "1", features = ["macros", "rt"] } diff --git a/linkerd/http/upgrade/Cargo.toml b/linkerd/http/upgrade/Cargo.toml index ceb0da30e8..3ed458d085 100644 --- a/linkerd/http/upgrade/Cargo.toml +++ b/linkerd/http/upgrade/Cargo.toml @@ -15,10 +15,7 @@ drain = "0.1" 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 } diff --git a/linkerd/metrics/Cargo.toml b/linkerd/metrics/Cargo.toml index e4d863fca4..08d33de55b 100644 --- a/linkerd/metrics/Cargo.toml +++ b/linkerd/metrics/Cargo.toml @@ -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 } diff --git a/linkerd/proxy/http/Cargo.toml b/linkerd/proxy/http/Cargo.toml index cba320704a..19c3b779ea 100644 --- a/linkerd/proxy/http/Cargo.toml +++ b/linkerd/proxy/http/Cargo.toml @@ -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" diff --git a/linkerd/proxy/tap/Cargo.toml b/linkerd/proxy/tap/Cargo.toml index 811a4f7d71..1f160c176a 100644 --- a/linkerd/proxy/tap/Cargo.toml +++ b/linkerd/proxy/tap/Cargo.toml @@ -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"] } From 401028ab825952dad4f0b45dfb39005657a368b3 Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Wed, 1 Jan 2025 00:00:00 +0000 Subject: [PATCH 02/14] chore(deps): add hyper-util workspace dependency Signed-off-by: katelyn martin --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index baad45ab6c..468553edac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -102,6 +102,7 @@ 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-types = { version = "0.13" } tokio-rustls = { version = "0.26", default-features = false, features = [ From 2e79e6cb9b91ddbd5f7d133ab5306779c6aa4e17 Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Tue, 7 Jan 2025 00:00:00 +0000 Subject: [PATCH 03/14] chore(deps): add http-body-util workspace dependency Signed-off-by: katelyn martin --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 468553edac..f833067218 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -101,6 +101,7 @@ bytes = { version = "1" } h2 = { version = "0.4" } http = { version = "1" } http-body = { version = "1" } +http-body-util = { version = "0.1" } hyper = { version = "1", default-features = false } hyper-util = { version = "0.1", default-features = false } prost = { version = "0.13" } From bb448f68a3c869113993d0aebdc5ac378f480bc1 Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Wed, 1 Jan 2025 00:00:00 +0000 Subject: [PATCH 04/14] chore(deps): upgrade linkerd2-proxy-api this commit represents main as of linkerd/linkerd2-proxy-api#421. Signed-off-by: katelyn martin --- Cargo.lock | 172 +++++++++++++++++++---------------------------------- Cargo.toml | 6 +- 2 files changed, 63 insertions(+), 115 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4ad379f3c5..72059ab297 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -164,7 +164,7 @@ dependencies = [ "bytes", "futures-util", "http 1.2.0", - "http-body 1.0.1", + "http-body", "http-body-util", "itoa", "matchit", @@ -190,7 +190,7 @@ dependencies = [ "bytes", "futures-util", "http 1.2.0", - "http-body 1.0.1", + "http-body", "http-body-util", "mime", "pin-project-lite", @@ -797,25 +797,6 @@ dependencies = [ "crc32fast", ] -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.7.1", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "h2" version = "0.4.7" @@ -943,17 +924,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -973,7 +943,7 @@ dependencies = [ "bytes", "futures-util", "http 1.2.0", - "http-body 1.0.1", + "http-body", "pin-project-lite", ] @@ -1004,9 +974,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.7", + "h2", "http 1.2.0", - "http-body 1.0.1", + "http-body", "httparse", "httpdate", "itoa", @@ -1022,7 +992,7 @@ version = "0.1.0" dependencies = [ "futures", "http 1.2.0", - "http-body 1.0.1", + "http-body", "hyper", "pin-project", "tokio", @@ -1053,7 +1023,7 @@ dependencies = [ "futures-channel", "futures-util", "http 1.2.0", - "http-body 1.0.1", + "http-body", "hyper", "pin-project-lite", "socket2", @@ -1381,7 +1351,7 @@ dependencies = [ "thiserror 2.0.11", "tokio", "tokio-stream", - "tonic 0.12.3", + "tonic", "tower 0.4.13", "tracing", ] @@ -1394,7 +1364,7 @@ dependencies = [ "deflate", "futures", "http 1.2.0", - "http-body 1.0.1", + "http-body", "hyper", "linkerd-app-core", "linkerd-app-inbound", @@ -1416,7 +1386,7 @@ dependencies = [ "drain", "futures", "http 1.2.0", - "http-body 1.0.1", + "http-body", "hyper", "ipnet", "linkerd-addr", @@ -1471,7 +1441,7 @@ dependencies = [ "thiserror 2.0.11", "tokio", "tokio-stream", - "tonic 0.12.3", + "tonic", "tower 0.4.13", "tracing", ] @@ -1492,7 +1462,7 @@ dependencies = [ "thiserror 2.0.11", "tokio", "tokio-test", - "tonic 0.12.3", + "tonic", "tower 0.4.13", "tower-test", "tracing", @@ -1528,7 +1498,7 @@ dependencies = [ "thiserror 2.0.11", "tokio", "tokio-test", - "tonic 0.12.3", + "tonic", "tower 0.4.13", "tracing", ] @@ -1540,9 +1510,9 @@ dependencies = [ "bytes", "flate2", "futures", - "h2 0.4.7", + "h2", "http 1.2.0", - "http-body 1.0.1", + "http-body", "hyper", "ipnet", "linkerd-app", @@ -1562,7 +1532,7 @@ dependencies = [ "tokio", "tokio-rustls", "tokio-stream", - "tonic 0.12.3", + "tonic", "tower 0.4.13", "tracing", "tracing-subscriber", @@ -1577,7 +1547,7 @@ dependencies = [ "futures", "futures-util", "http 1.2.0", - "http-body 1.0.1", + "http-body", "hyper", "linkerd-app-core", "linkerd-app-test", @@ -1607,7 +1577,7 @@ dependencies = [ "tokio", "tokio-rustls", "tokio-test", - "tonic 0.12.3", + "tonic", "tower 0.4.13", "tower-test", "tracing", @@ -1618,9 +1588,9 @@ name = "linkerd-app-test" version = "0.1.0" dependencies = [ "futures", - "h2 0.4.7", + "h2", "http 1.2.0", - "http-body 1.0.1", + "http-body", "hyper", "linkerd-app-core", "linkerd-http-route", @@ -1634,7 +1604,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-test", - "tonic 0.12.3", + "tonic", "tower 0.4.13", "tracing", "tracing-subscriber", @@ -1764,7 +1734,7 @@ dependencies = [ "bytes", "futures", "http 1.2.0", - "http-body 1.0.1", + "http-body", "linkerd-error", "linkerd-stack", "pin-project", @@ -1776,7 +1746,7 @@ version = "0.1.0" dependencies = [ "futures", "http 1.2.0", - "http-body 1.0.1", + "http-body", "linkerd-error", "linkerd-http-box", "linkerd-stack", @@ -1819,7 +1789,7 @@ dependencies = [ "bytes", "futures", "http 1.2.0", - "http-body 1.0.1", + "http-body", "hyper", "linkerd-error", "linkerd-http-classify", @@ -1849,7 +1819,7 @@ dependencies = [ "bytes", "futures", "http 1.2.0", - "http-body 1.0.1", + "http-body", "linkerd-error", "linkerd-http-box", "linkerd-metrics", @@ -1866,7 +1836,7 @@ name = "linkerd-http-retain" version = "0.1.0" dependencies = [ "http 1.2.0", - "http-body 1.0.1", + "http-body", "linkerd-stack", "pin-project", "tower 0.4.13", @@ -1879,7 +1849,7 @@ dependencies = [ "bytes", "futures", "http 1.2.0", - "http-body 1.0.1", + "http-body", "hyper", "linkerd-error", "linkerd-exp-backoff", @@ -1915,7 +1885,7 @@ version = "0.1.0" dependencies = [ "futures", "http 1.2.0", - "http-body 1.0.1", + "http-body", "linkerd-error", "linkerd-stack", "parking_lot", @@ -1933,7 +1903,7 @@ dependencies = [ "drain", "futures", "http 1.2.0", - "http-body 1.0.1", + "http-body", "hyper", "linkerd-duplex", "linkerd-error", @@ -2081,7 +2051,7 @@ version = "0.1.0" dependencies = [ "deflate", "http 1.2.0", - "http-body 1.0.1", + "http-body", "hyper", "linkerd-http-box", "linkerd-stack", @@ -2103,14 +2073,14 @@ version = "0.1.0" dependencies = [ "futures", "http 1.2.0", - "http-body 1.0.1", + "http-body", "linkerd-error", "linkerd-metrics", "linkerd-trace-context", "opencensus-proto", "tokio", "tokio-stream", - "tonic 0.12.3", + "tonic", "tracing", ] @@ -2120,7 +2090,7 @@ version = "0.1.0" dependencies = [ "futures", "http 0.2.12", - "http-body 1.0.1", + "http-body", "linkerd-error", "linkerd-metrics", "linkerd-trace-context", @@ -2129,7 +2099,7 @@ dependencies = [ "opentelemetry_sdk", "tokio", "tokio-stream", - "tonic 0.12.3", + "tonic", "tracing", ] @@ -2184,7 +2154,7 @@ version = "0.1.0" dependencies = [ "futures", "http 1.2.0", - "http-body 1.0.1", + "http-body", "linkerd-addr", "linkerd-error", "linkerd-http-h2", @@ -2196,7 +2166,7 @@ dependencies = [ "linkerd2-proxy-api", "pin-project", "prost 0.13.4", - "tonic 0.12.3", + "tonic", "tower 0.4.13", "tracing", ] @@ -2271,7 +2241,7 @@ dependencies = [ "prost-types 0.13.4", "quickcheck", "thiserror 2.0.11", - "tonic 0.12.3", + "tonic", ] [[package]] @@ -2307,9 +2277,9 @@ dependencies = [ "bytes", "drain", "futures", - "h2 0.4.7", + "h2", "http 1.2.0", - "http-body 1.0.1", + "http-body", "httparse", "hyper", "hyper-balance", @@ -2347,7 +2317,7 @@ name = "linkerd-proxy-identity-client" version = "0.1.0" dependencies = [ "futures", - "http-body 1.0.1", + "http-body", "linkerd-dns-name", "linkerd-error", "linkerd-identity", @@ -2358,7 +2328,7 @@ dependencies = [ "pin-project", "thiserror 2.0.11", "tokio", - "tonic 0.12.3", + "tonic", "tracing", ] @@ -2409,7 +2379,7 @@ dependencies = [ "thiserror 2.0.11", "tokio", "tokio-test", - "tonic 0.12.3", + "tonic", "tower 0.4.13", "tracing", "x509-parser", @@ -2422,7 +2392,7 @@ dependencies = [ "bytes", "futures", "http 1.2.0", - "http-body 1.0.1", + "http-body", "hyper", "ipnet", "linkerd-conditional", @@ -2440,7 +2410,7 @@ dependencies = [ "rand", "thiserror 2.0.11", "tokio", - "tonic 0.12.3", + "tonic", "tower 0.4.13", "tracing", ] @@ -2524,7 +2494,7 @@ dependencies = [ "bytes", "futures", "http 1.2.0", - "http-body 1.0.1", + "http-body", "linkerd-addr", "linkerd-dns-name", "linkerd-error", @@ -2541,7 +2511,7 @@ dependencies = [ "thiserror 2.0.11", "tokio", "tokio-stream", - "tonic 0.12.3", + "tonic", "tower 0.4.13", "tracing", ] @@ -2654,7 +2624,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-test", - "tonic 0.12.3", + "tonic", "tracing", ] @@ -2669,7 +2639,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-test", - "tonic 0.12.3", + "tonic", "tower-test", "tracing", ] @@ -2758,17 +2728,16 @@ dependencies = [ [[package]] name = "linkerd2-proxy-api" version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4682c00263191a5bfa4fbe64f6d80b22ff2b49aaa294da5aac062f5abc6eb9e" +source = "git+https://github.com/linkerd/linkerd2-proxy-api.git?rev=981369a18918ce5570b2d49c329eca55ae831e87#981369a18918ce5570b2d49c329eca55ae831e87" dependencies = [ - "h2 0.3.26", - "http 0.2.12", + "h2", + "http 1.2.0", "ipnet", - "prost 0.12.6", - "prost-types 0.12.6", + "prost 0.13.4", + "prost-types 0.13.4", "quickcheck", - "thiserror 1.0.69", - "tonic 0.10.2", + "thiserror 2.0.11", + "tonic", ] [[package]] @@ -3006,7 +2975,7 @@ dependencies = [ "bytes", "prost 0.13.4", "prost-types 0.13.4", - "tonic 0.12.3", + "tonic", "tonic-build", ] @@ -3042,7 +3011,7 @@ dependencies = [ "opentelemetry", "opentelemetry_sdk", "prost 0.13.4", - "tonic 0.12.3", + "tonic", "tonic-build", ] @@ -3724,7 +3693,7 @@ dependencies = [ "bytes", "prost 0.13.4", "prost-types 0.13.4", - "tonic 0.12.3", + "tonic", "tonic-build", ] @@ -4037,27 +4006,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tonic" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" -dependencies = [ - "async-trait", - "base64 0.21.7", - "bytes", - "http 0.2.12", - "http-body 0.4.6", - "percent-encoding", - "pin-project", - "prost 0.12.6", - "tokio", - "tokio-stream", - "tower-layer", - "tower-service", - "tracing", -] - [[package]] name = "tonic" version = "0.12.3" @@ -4069,9 +4017,9 @@ dependencies = [ "axum", "base64 0.22.1", "bytes", - "h2 0.4.7", + "h2", "http 1.2.0", - "http-body 1.0.1", + "http-body", "http-body-util", "hyper", "hyper-timeout", diff --git a/Cargo.toml b/Cargo.toml index f833067218..a3ba115193 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -114,6 +114,6 @@ tonic = { version = "0.12", default-features = false } tonic-build = { version = "0.12", default-features = false } [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 From 31d19a4d6fb624ebf102a6b8004faa35f39c7ef9 Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Wed, 1 Jan 2025 00:00:00 +0000 Subject: [PATCH 05/14] chore(http/box): upgrade to hyper 1.x Signed-off-by: katelyn martin --- linkerd/http/box/src/body.rs | 75 ++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/linkerd/http/box/src/body.rs b/linkerd/http/box/src/body.rs index 3693de1e36..3029748a21 100644 --- a/linkerd/http/box/src/body.rs +++ b/linkerd/http/box/src/body.rs @@ -1,5 +1,4 @@ -use http::{HeaderMap, HeaderValue}; -use http_body::Body; +use http_body::{Body, Frame}; use linkerd_error::Error; use pin_project::pin_project; use std::pin::Pin; @@ -63,19 +62,11 @@ impl Body for BoxBody { } #[inline] - fn poll_data( + fn poll_frame( mut self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { - self.as_mut().inner.as_mut().poll_data(cx) - } - - #[inline] - fn poll_trailers( - mut self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll>, Self::Error>> { - self.as_mut().inner.as_mut().poll_trailers(cx) + ) -> Poll, Self::Error>>> { + self.as_mut().inner.as_mut().poll_frame(cx) } #[inline] @@ -84,6 +75,17 @@ impl Body for BoxBody { } } +impl Data { + fn new(buf: B) -> Self + where + B: bytes::Buf + Send + 'static, + { + Self { + inner: Box::new(buf), + } + } +} + impl bytes::Buf for Data { fn remaining(&self) -> usize { self.inner.remaining() @@ -116,24 +118,16 @@ where self.0.is_end_stream() } - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { - let opt = futures::ready!(self.project().0.poll_data(cx)); - Poll::Ready(opt.map(|res| { - res.map_err(Into::into).map(|buf| Data { - inner: Box::new(buf), - }) - })) - } + ) -> Poll, Self::Error>>> { + // Poll the inner body `B` for the next frame. + let body = self.project().0; + let frame = futures::ready!(body.poll_frame(cx)); + let frame = frame.map(Self::map_frame); - #[inline] - fn poll_trailers( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll>, Self::Error>> { - Poll::Ready(futures::ready!(self.project().0.poll_trailers(cx)).map_err(Into::into)) + Poll::Ready(frame) } #[inline] @@ -142,6 +136,20 @@ where } } +impl Inner +where + B: Body, + B::Data: Send + 'static, + B::Error: Into, +{ + fn map_frame(frame: Result, B::Error>) -> Result, Error> { + match frame { + Ok(f) => Ok(f.map_data(Data::new)), + Err(e) => Err(e.into()), + } + } +} + impl std::fmt::Debug for BoxBody { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("BoxBody").finish() @@ -156,20 +164,13 @@ impl Body for NoBody { true } - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, _: &mut Context<'_>, - ) -> Poll>> { + ) -> Poll, Self::Error>>> { Poll::Ready(None) } - fn poll_trailers( - self: Pin<&mut Self>, - _: &mut Context<'_>, - ) -> Poll>, Self::Error>> { - Poll::Ready(Ok(None)) - } - fn size_hint(&self) -> http_body::SizeHint { http_body::SizeHint::with_exact(0) } From ad58f8dc11a8af2fbe8e93d274621ba38a43f0ef Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Wed, 1 Jan 2025 00:00:00 +0000 Subject: [PATCH 06/14] chore(hyper-balance): upgrade to hyper 1.x Signed-off-by: katelyn martin --- hyper-balance/src/lib.rs | 140 ++++++++++++++++----------------------- 1 file changed, 57 insertions(+), 83 deletions(-) diff --git a/hyper-balance/src/lib.rs b/hyper-balance/src/lib.rs index 0fc23ca524..dbfe8eb6cb 100644 --- a/hyper-balance/src/lib.rs +++ b/hyper-balance/src/lib.rs @@ -102,32 +102,20 @@ where self.body.is_end_stream() } - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { + ) -> Poll, Self::Error>>> { let this = self.project(); - let ret = futures::ready!(this.body.poll_data(cx)); + let ret = futures::ready!(this.body.poll_frame(cx)); - // Once a data frame is received, the handle is dropped. On subsequent calls, this + // Once a frame is received, the handle is dropped. On subsequent calls, this // is a noop. drop(this.handle.take()); Poll::Ready(ret) } - fn poll_trailers( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll, Self::Error>> { - let this = self.project(); - // If this is being called, the handle definitely should have been dropped - // already. - drop(this.handle.take()); - - this.body.poll_trailers(cx) - } - #[inline] fn size_hint(&self) -> hyper::body::SizeHint { self.body.size_hint() @@ -157,35 +145,21 @@ impl Body for PendingUntilEosBody { self.body.is_end_stream() } - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { + ) -> Poll, Self::Error>>> { let mut this = self.project(); let body = &mut this.body; tokio::pin!(body); - let ret = futures::ready!(body.poll_data(cx)); + let frame = futures::ready!(body.poll_frame(cx)); // If this was the last frame, then drop the handle immediately. if this.body.is_end_stream() { drop(this.handle.take()); } - Poll::Ready(ret) - } - - fn poll_trailers( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll, Self::Error>> { - let this = self.project(); - let ret = futures::ready!(this.body.poll_trailers(cx)); - - // Once trailers are received, the handle is dropped immediately (in case the body - // is retained longer for some reason). - drop(this.handle.take()); - - Poll::Ready(ret) + Poll::Ready(frame) } #[inline] @@ -198,7 +172,7 @@ impl Body for PendingUntilEosBody { mod tests { use super::{PendingUntilEos, PendingUntilFirstData}; use futures::future::poll_fn; - use http_body::Body; + use http_body::{Body, Frame}; use std::collections::VecDeque; use std::io::Cursor; use std::pin::Pin; @@ -225,11 +199,13 @@ mod tests { assert_ready!(task::spawn(poll_fn(|cx| { let body = &mut body; tokio::pin!(body); - body.poll_data(cx) + body.poll_frame(cx) })) .poll()) - .expect("data some") - .expect("data ok"); + .expect("frame is some") + .expect("frame is ok") + .into_data() + .expect("frame is data"); assert!(wk.upgrade().is_none()); } @@ -282,10 +258,10 @@ mod tests { let res = assert_ready!(task::spawn(poll_fn(|cx| { let body = &mut body; tokio::pin!(body); - body.poll_data(cx) + body.poll_frame(cx) })) .poll()); - assert!(res.expect("data is some").is_err()); + assert!(res.expect("frame is some").is_err()); assert!(wk.upgrade().is_none()); } @@ -308,21 +284,21 @@ mod tests { assert_ready!(task::spawn(poll_fn(|cx| { let body = &mut body; tokio::pin!(body); - body.poll_data(cx) + body.poll_frame(cx) })) .poll()) - .expect("data some") - .expect("data ok"); + .expect("frame is some") + .expect("frame is ok"); assert!(wk.upgrade().is_some()); assert_ready!(task::spawn(poll_fn(|cx| { let body = &mut body; tokio::pin!(body); - body.poll_data(cx) + body.poll_frame(cx) })) .poll()) - .expect("data some") - .expect("data ok"); + .expect("frame is some") + .expect("frame is ok"); assert!(wk.upgrade().is_none()); } @@ -355,40 +331,42 @@ mod tests { assert_ready!(task::spawn(poll_fn(|cx| { let body = &mut body; tokio::pin!(body); - body.poll_data(cx) + body.poll_frame(cx) })) .poll()) - .expect("data") - .expect("data ok"); + .expect("frame is some") + .expect("frame is ok"); assert!(wk.upgrade().is_some()); assert_ready!(task::spawn(poll_fn(|cx| { let body = &mut body; tokio::pin!(body); - body.poll_data(cx) + body.poll_frame(cx) })) .poll()) - .expect("data") - .expect("data ok"); + .expect("frame is some") + .expect("frame is ok"); assert!(wk.upgrade().is_some()); - let poll = assert_ready!(task::spawn(poll_fn(|cx| { + assert_ready!(task::spawn(poll_fn(|cx| { let body = &mut body; tokio::pin!(body); - body.poll_data(cx) + body.poll_frame(cx) })) - .poll()); - assert!(poll.is_none()); - assert!(wk.upgrade().is_some()); + .poll()) + .expect("frame is some") + .expect("frame is ok") + .into_trailers() + .expect("is trailers"); + assert!(wk.upgrade().is_none()); - assert_ready!(task::spawn(poll_fn(|cx| { + let poll = assert_ready!(task::spawn(poll_fn(|cx| { let body = &mut body; tokio::pin!(body); - body.poll_trailers(cx) + body.poll_frame(cx) })) - .poll()) - .expect("trailers ok") - .expect("trailers"); + .poll()); + assert!(poll.is_none()); assert!(wk.upgrade().is_none()); } @@ -411,7 +389,7 @@ mod tests { let poll = assert_ready!(task::spawn(poll_fn(|cx| { let body = &mut body; tokio::pin!(body); - body.poll_data(cx) + body.poll_frame(cx) })) .poll()); assert!(poll.expect("some").is_err()); @@ -437,20 +415,21 @@ mod tests { self.0.is_empty() & self.1.is_none() } - fn poll_data( + fn poll_frame( mut self: Pin<&mut Self>, _: &mut Context<'_>, - ) -> Poll>> { - Poll::Ready(self.as_mut().0.pop_front().map(Cursor::new).map(Ok)) - } - - fn poll_trailers( - mut self: Pin<&mut Self>, - _: &mut Context<'_>, - ) -> Poll, Self::Error>> { + ) -> Poll, Self::Error>>> { let mut this = self.as_mut(); - assert!(this.0.is_empty()); - Poll::Ready(Ok(this.1.take())) + + // Return the next data frame from the sequence of chunks. + if let Some(chunk) = this.0.pop_front() { + let frame = Some(Ok(Frame::data(Cursor::new(chunk)))); + return Poll::Ready(frame); + } + + // Yield the trailers once all data frames have been yielded. + let trailers = this.1.take().map(Frame::::trailers).map(Ok); + Poll::Ready(trailers) } } @@ -464,18 +443,13 @@ mod tests { self.0.is_none() } - fn poll_data( + fn poll_frame( mut self: Pin<&mut Self>, _: &mut Context<'_>, - ) -> Poll>> { - Poll::Ready(Some(Err(self.as_mut().0.take().expect("err")))) - } + ) -> Poll, Self::Error>>> { + let err = self.as_mut().0.take().expect("err"); - fn poll_trailers( - mut self: Pin<&mut Self>, - _: &mut Context<'_>, - ) -> Poll, Self::Error>> { - Poll::Ready(Err(self.as_mut().0.take().expect("err"))) + Poll::Ready(Some(Err(err))) } } } From db038ecc93c7616f35372a18af3c6f92f3679a87 Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Wed, 1 Jan 2025 00:00:00 +0000 Subject: [PATCH 07/14] chore(http/retain): ugrade to hyper 1.x Signed-off-by: katelyn martin --- linkerd/http/retain/src/lib.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/linkerd/http/retain/src/lib.rs b/linkerd/http/retain/src/lib.rs index fe60f2c9ea..327ed50555 100644 --- a/linkerd/http/retain/src/lib.rs +++ b/linkerd/http/retain/src/lib.rs @@ -108,19 +108,11 @@ impl http_body::Body for RetainBody { } #[inline] - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { - self.project().inner.poll_data(cx) - } - - #[inline] - fn poll_trailers( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll>, B::Error>> { - self.project().inner.poll_trailers(cx) + ) -> Poll, Self::Error>>> { + self.project().inner.poll_frame(cx) } #[inline] From 69ee4ea8706dd07ee5816be730869cbfaa18a72a Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Wed, 1 Jan 2025 00:00:00 +0000 Subject: [PATCH 08/14] chore(http/stream-timeouts): upgrade to hyper 1.x Signed-off-by: katelyn martin --- linkerd/http/stream-timeouts/src/lib.rs | 75 +++++++------------------ 1 file changed, 21 insertions(+), 54 deletions(-) diff --git a/linkerd/http/stream-timeouts/src/lib.rs b/linkerd/http/stream-timeouts/src/lib.rs index 90ffc99ea9..7d618bb5f1 100644 --- a/linkerd/http/stream-timeouts/src/lib.rs +++ b/linkerd/http/stream-timeouts/src/lib.rs @@ -3,6 +3,7 @@ //! See [`EnforceTimeouts`]. use futures::FutureExt; +use http_body::Frame; use linkerd_error::{Error, Result}; use linkerd_stack as svc; use parking_lot::RwLock; @@ -356,47 +357,31 @@ where type Data = B::Data; type Error = Error; - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { - let this = self.project(); - - if let Poll::Ready(res) = this.inner.poll_data(cx) { - if let Some(idle) = this.idle { - idle.reset(time::Instant::now()); - } - return Poll::Ready(res); - } - - if let Poll::Ready(e) = poll_body_timeout(this.deadline, this.idle, cx) { - // TODO telemetry - return Poll::Ready(Some(Err(Error::from(e)))); - } - - Poll::Pending - } - - fn poll_trailers( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll, Self::Error>> { - let this = self.project(); + ) -> Poll, Self::Error>>> { + let mut this = self.project(); - if let Poll::Ready(res) = this.inner.poll_trailers(cx) { + // Poll for the next frame. + if let Poll::Ready(res) = this.inner.as_mut().poll_frame(cx) { let now = time::Instant::now(); if let Some(idle) = this.idle { idle.reset(now); } - if let Some(tx) = this.request_flushed.take() { - let _ = tx.send(now); + // Send a timestamp when the end of the stream is reached. + if this.inner.as_ref().is_end_stream() { + if let Some(tx) = this.request_flushed.take() { + let _ = tx.send(now); + } } return Poll::Ready(res); } + // Poll for a timeout error. if let Poll::Ready(e) = poll_body_timeout(this.deadline, this.idle, cx) { // TODO telemetry - return Poll::Ready(Err(Error::from(e))); + return Poll::Ready(Some(Err(Error::from(e)))); } Poll::Pending @@ -416,19 +401,22 @@ where type Data = B::Data; type Error = Error; - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { - let this = self.project(); + ) -> Poll, Self::Error>>> { + let mut this = self.project(); - if let Poll::Ready(res) = this.inner.poll_data(cx) { + // Poll for the next frame. + if let Poll::Ready(res) = this.inner.as_mut().poll_frame(cx) { + let now = time::Instant::now(); if let Some(idle) = this.idle { - idle.reset(time::Instant::now()); + idle.reset(now); } return Poll::Ready(res); } + // Poll for a timeout error. if let Poll::Ready(e) = poll_body_timeout(this.deadline, this.idle, cx) { // TODO telemetry return Poll::Ready(Some(Err(Error::from(e)))); @@ -437,27 +425,6 @@ where Poll::Pending } - fn poll_trailers( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll, Self::Error>> { - let this = self.project(); - - if let Poll::Ready(res) = this.inner.poll_trailers(cx) { - if let Some(idle) = this.idle { - idle.reset(time::Instant::now()); - }; - return Poll::Ready(res); - } - - if let Poll::Ready(e) = poll_body_timeout(this.deadline, this.idle, cx) { - // TODO telemetry - return Poll::Ready(Err(Error::from(e))); - } - - Poll::Pending - } - fn is_end_stream(&self) -> bool { self.inner.is_end_stream() } From 4e4c638827e56bad4d06b1e36317e5bcacbc3c4c Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Wed, 1 Jan 2025 00:00:00 +0000 Subject: [PATCH 09/14] chore(http/classify): upgrade to hyper 1.x Signed-off-by: katelyn martin --- linkerd/http/classify/src/channel.rs | 41 ++++++++++++---------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/linkerd/http/classify/src/channel.rs b/linkerd/http/classify/src/channel.rs index 247e7b282b..63c4009fbd 100644 --- a/linkerd/http/classify/src/channel.rs +++ b/linkerd/http/classify/src/channel.rs @@ -1,5 +1,6 @@ use super::{ClassifyEos, ClassifyResponse}; use futures::{prelude::*, ready}; +use http_body::Frame; use linkerd_error::Error; use linkerd_stack::{layer, ExtractParam, NewService, Service}; use pin_project::{pin_project, pinned_drop}; @@ -215,40 +216,34 @@ where type Data = B::Data; type Error = B::Error; - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { + ) -> Poll, Self::Error>>> { let this = self.project(); - match ready!(this.inner.poll_data(cx)) { - None => Poll::Ready(None), - Some(Ok(data)) => Poll::Ready(Some(Ok(data))), - Some(Err(e)) => { + match ready!(this.inner.poll_frame(cx)) { + None => { + // Classify the stream if it has reached a `None`. if let Some(State { classify, tx }) = this.state.take() { - let _ = tx.try_send(classify.error(&e)); + let _ = tx.try_send(classify.eos(None)); } - Poll::Ready(Some(Err(e))) + Poll::Ready(None) } - } - } - - fn poll_trailers( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll, Self::Error>> { - let this = self.project(); - match ready!(this.inner.poll_trailers(cx)) { - Ok(trls) => { - if let Some(State { classify, tx }) = this.state.take() { - let _ = tx.try_send(classify.eos(trls.as_ref())); + Some(Ok(data)) => { + // Classify the stream if this is a trailers frame. + if let trls @ Some(_) = data.trailers_ref() { + if let Some(State { classify, tx }) = this.state.take() { + let _ = tx.try_send(classify.eos(trls)); + } } - Poll::Ready(Ok(trls)) + Poll::Ready(Some(Ok(data))) } - Err(e) => { + Some(Err(e)) => { + // Classify the stream if an error has been encountered. if let Some(State { classify, tx }) = this.state.take() { let _ = tx.try_send(classify.error(&e)); } - Poll::Ready(Err(e)) + Poll::Ready(Some(Err(e))) } } } From d0f7253335de34461c6c4ba38b5768eb70da0889 Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Wed, 1 Jan 2025 00:00:00 +0000 Subject: [PATCH 10/14] chore(http/upgrade): upgrade to hyper 1.x NOTE: there is a comment noting that the upgrade middleware does not expect to be cloneable. it is unfortunately, however, at odds with the new bounds expected of extensions. so, `Http11Upgrade` is now Clone'able, but a comment is left in place noting this weakened invariant. it's worth investigating how upgrades have changed since, in more detail, but for the current moment we are interested in being especially conservative about changing behavior, and focusing on api changes like `Body::poll_frame(..)`. Signed-off-by: katelyn martin --- Cargo.lock | 7 +-- linkerd/http/upgrade/Cargo.toml | 4 ++ linkerd/http/upgrade/src/glue.rs | 79 ++++++++++++++++++++--------- linkerd/http/upgrade/src/upgrade.rs | 14 ++++- 4 files changed, 72 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 72059ab297..0f6a9e7e0f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -221,12 +221,6 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -1905,6 +1899,7 @@ dependencies = [ "http 1.2.0", "http-body", "hyper", + "hyper-util", "linkerd-duplex", "linkerd-error", "linkerd-http-box", diff --git a/linkerd/http/upgrade/Cargo.toml b/linkerd/http/upgrade/Cargo.toml index 3ed458d085..ac6a736186 100644 --- a/linkerd/http/upgrade/Cargo.toml +++ b/linkerd/http/upgrade/Cargo.toml @@ -16,6 +16,10 @@ futures = { version = "0.3", default-features = false } http = { workspace = true } http-body = { workspace = true } hyper = { workspace = true, default-features = false, features = ["client"] } +hyper-util = { workspace = true, default-features = false, features = [ + "client", + "client-legacy", +] } pin-project = "1" thiserror = "2" tokio = { version = "1", default-features = false } diff --git a/linkerd/http/upgrade/src/glue.rs b/linkerd/http/upgrade/src/glue.rs index 0b3aaadc70..28777fa5c7 100644 --- a/linkerd/http/upgrade/src/glue.rs +++ b/linkerd/http/upgrade/src/glue.rs @@ -1,7 +1,7 @@ use crate::upgrade::Http11Upgrade; use futures::{ready, TryFuture}; -use http_body::Body; -use hyper::client::connect as hyper_connect; +use http_body::{Body, Frame}; +use hyper_util::client::legacy::connect as hyper_connect; use linkerd_error::{Error, Result}; use linkerd_http_box::BoxBody; use linkerd_io::{self as io, AsyncRead, AsyncWrite}; @@ -62,38 +62,21 @@ where self.body.is_end_stream() } - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { - // Poll the next chunk from the body. + ) -> Poll, Self::Error>>> { + // Poll the next frame from the body. let this = self.project(); let body = this.body; - let data = ready!(body.poll_data(cx)); + let frame = ready!(body.poll_frame(cx)); // Log errors. - if let Some(Err(e)) = &data { + if let Some(Err(e)) = &frame { debug!("http body error: {}", e); } - Poll::Ready(data) - } - - fn poll_trailers( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll, Self::Error>> { - // Poll the trailers from the body. - let this = self.project(); - let body = this.body; - let trailers = ready!(body.poll_trailers(cx)); - - // Log errors. - if let Err(e) = &trailers { - debug!("http trailers error: {}", e); - } - - Poll::Ready(trailers) + Poll::Ready(frame) } #[inline] @@ -240,6 +223,52 @@ where } } +impl hyper::rt::Read for Connection { + fn poll_read( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + buf: hyper::rt::ReadBufCursor<'_>, + ) -> Poll> { + self.project().transport.poll_read(cx, buf) + } +} + +impl hyper::rt::Write for Connection { + fn poll_write( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + buf: &[u8], + ) -> Poll> { + self.project().transport.poll_write(cx, buf) + } + + fn poll_flush( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll> { + self.project().transport.poll_flush(cx) + } + + fn poll_shutdown( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll> { + self.project().transport.poll_shutdown(cx) + } + + fn is_write_vectored(&self) -> bool { + self.transport.is_write_vectored() + } + + fn poll_write_vectored( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + bufs: &[std::io::IoSlice<'_>], + ) -> Poll> { + self.project().transport.poll_write_vectored(cx, bufs) + } +} + impl hyper_connect::Connection for Connection { fn connected(&self) -> hyper_connect::Connected { hyper_connect::Connected::new().proxy(self.absolute_form) diff --git a/linkerd/http/upgrade/src/upgrade.rs b/linkerd/http/upgrade/src/upgrade.rs index 14bbc6ffa1..d729fb52a6 100644 --- a/linkerd/http/upgrade/src/upgrade.rs +++ b/linkerd/http/upgrade/src/upgrade.rs @@ -39,7 +39,7 @@ struct Http11UpgradeHalves { /// A marker type inserted into Extensions to signal it was an HTTP CONNECT /// request. -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct HttpConnect; struct Inner { @@ -170,6 +170,9 @@ impl Drop for Inner { let both_upgrades = async move { let (server_conn, client_conn) = tokio::try_join!(server_upgrade, client_upgrade)?; trace!("HTTP upgrade successful"); + use hyper_util::rt::TokioIo; + let client_conn = TokioIo::new(client_conn); + let server_conn = TokioIo::new(server_conn); if let Err(e) = Duplex::new(client_conn, server_conn).await { info!("tcp duplex error: {}", e) } @@ -203,6 +206,15 @@ impl Service { } } +impl Clone for Service { + fn clone(&self) -> Self { + Self { + service: self.service.clone(), + upgrade_drain_signal: self.upgrade_drain_signal.clone(), + } + } +} + type ResponseFuture = Either, E>>>; impl tower::Service> for Service From 9aedae30a2a90705ece3550862e95156dd9ed68b Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Tue, 7 Jan 2025 00:00:00 +0000 Subject: [PATCH 11/14] chore(metrics): upgrade to hyper 1.x a brief note; this commit happened to tickle an unfortunate sharp edge in `BoxBody` and `Full`'s respective constructors. type inference could not figure out how to construct the body, so we refrain from boxing the response body now. Signed-off-by: katelyn martin --- Cargo.lock | 2 ++ linkerd/metrics/Cargo.toml | 2 ++ linkerd/metrics/src/serve.rs | 13 +++++++++---- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0f6a9e7e0f..a7229975ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2044,9 +2044,11 @@ dependencies = [ name = "linkerd-metrics" version = "0.1.0" dependencies = [ + "bytes", "deflate", "http 1.2.0", "http-body", + "http-body-util", "hyper", "linkerd-http-box", "linkerd-stack", diff --git a/linkerd/metrics/Cargo.toml b/linkerd/metrics/Cargo.toml index 08d33de55b..fdaa0f98d7 100644 --- a/linkerd/metrics/Cargo.toml +++ b/linkerd/metrics/Cargo.toml @@ -13,9 +13,11 @@ stack = ["linkerd-stack"] test_util = [] [dependencies] +bytes = { workspace = true } deflate = { version = "1", features = ["gzip"] } http = { workspace = true } http-body = { workspace = true } +http-body-util = { workspace = true } hyper = { workspace = true, features = ["http1", "http2"] } linkerd-http-box = { path = "../http/box" } linkerd-stack = { path = "../stack", optional = true } diff --git a/linkerd/metrics/src/serve.rs b/linkerd/metrics/src/serve.rs index 045e5d5015..ad64501c11 100644 --- a/linkerd/metrics/src/serve.rs +++ b/linkerd/metrics/src/serve.rs @@ -1,5 +1,5 @@ +use bytes::Bytes; use deflate::{write::GzEncoder, CompressionOptions}; -use linkerd_http_box::BoxBody; use std::io::Write; use tracing::trace; @@ -33,7 +33,10 @@ impl Serve { } impl Serve { - pub fn serve(&self, req: http::Request) -> std::io::Result> { + pub fn serve( + &self, + req: http::Request, + ) -> std::io::Result>> { if Self::is_gzip(&req) { trace!("gzipping metrics"); let mut writer = GzEncoder::new(Vec::::new(), CompressionOptions::fast()); @@ -41,14 +44,16 @@ impl Serve { Ok(http::Response::builder() .header(http::header::CONTENT_ENCODING, "gzip") .header(http::header::CONTENT_TYPE, "text/plain") - .body(BoxBody::new(hyper::Body::from(writer.finish()?))) + .body(http_body_util::Full::from( + writer.finish().map(Bytes::from)?, + )) .expect("Response must be valid")) } else { let mut writer = Vec::::new(); write!(&mut writer, "{}", self.metrics.as_display())?; Ok(http::Response::builder() .header(http::header::CONTENT_TYPE, "text/plain") - .body(BoxBody::new(hyper::Body::from(writer))) + .body(http_body_util::Full::from(Bytes::from(writer))) .expect("Response must be valid")) } } From c4813dd34b2af477f8dd1d828b11a5fc572f3cac Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Tue, 7 Jan 2025 00:00:00 +0000 Subject: [PATCH 12/14] chore(http/metrics): upgrade to hyper 1.x Signed-off-by: katelyn martin --- linkerd/http/metrics/src/requests/service.rs | 69 ++++++++++---------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/linkerd/http/metrics/src/requests/service.rs b/linkerd/http/metrics/src/requests/service.rs index ad1af7ecbc..c0247aeeed 100644 --- a/linkerd/http/metrics/src/requests/service.rs +++ b/linkerd/http/metrics/src/requests/service.rs @@ -1,6 +1,6 @@ use super::{Metrics, StatusMetrics}; use futures::{ready, TryFuture}; -use http_body::Body; +use http_body::{Body, Frame}; use linkerd_error::Error; use linkerd_http_classify::{ClassifyEos, ClassifyResponse}; use linkerd_metrics::NewMetrics; @@ -266,12 +266,12 @@ where self.inner.is_end_stream() } - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { + ) -> Poll, Self::Error>>> { let this = self.project(); - let frame = ready!(this.inner.poll_data(cx)); + let frame = ready!(this.inner.poll_frame(cx)); if let Some(lock) = this.metrics.take() { let now = Instant::now(); @@ -283,13 +283,6 @@ where Poll::Ready(frame) } - fn poll_trailers( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll, Self::Error>> { - self.project().inner.poll_trailers(cx) - } - #[inline] fn size_hint(&self) -> http_body::SizeHint { self.inner.size_hint() @@ -408,38 +401,46 @@ where self.inner.is_end_stream() } - fn poll_data( + fn poll_frame( mut self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { - let poll = ready!(self.as_mut().project().inner.poll_data(cx)); + ) -> Poll, Self::Error>>> { + // Poll the body for the next frame. + let poll = ready!(self.as_mut().project().inner.poll_frame(cx)); let frame = poll.map(|opt| opt.map_err(|e| self.as_mut().measure_err(e.into()))); + // Update latency metrics if we are tracking body latency. if !(*self.as_mut().project().latency_recorded) { - self.record_latency(); + self.as_mut().record_latency(); } - Poll::Ready(frame) - } - - fn poll_trailers( - mut self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll, Self::Error>> { - let trls = ready!(self.as_mut().project().inner.poll_trailers(cx)) - .map_err(|e| self.as_mut().measure_err(e.into()))?; - - if let Some(c) = self - .as_mut() - .project() - .classify - .take() - .map(|c| c.eos(trls.as_ref())) - { - self.record_class(c); + match &frame { + // Classify the stream if we have reached the end of the stream. + None => { + if let Some(classify) = self.as_mut().project().classify.take() { + let class = classify.eos(None); + self.record_class(class); + } + } + // Classify the stream if we have reached a trailers frame. + Some(Ok(frame)) => { + if let trls @ Some(_) = frame.trailers_ref() { + if let Some(classify) = self.as_mut().project().classify.take() { + let class = classify.eos(trls); + self.record_class(class); + } + } + } + // Classify the stream if we have reached an error. + Some(Err(error)) => { + if let Some(classify) = self.as_mut().project().classify.take() { + let class = classify.error(error); + self.record_class(class); + } + } } - Poll::Ready(Ok(trls)) + Poll::Ready(frame) } #[inline] From 549682b9097d8eec3462eb8d07464c88055bf067 Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Tue, 7 Jan 2025 00:00:00 +0000 Subject: [PATCH 13/14] chore(http/prom): upgrade to hyper 1.x Signed-off-by: katelyn martin --- linkerd/http/prom/src/body_data/body.rs | 35 ++++++++----------- linkerd/http/prom/src/record_response.rs | 34 +++++++++--------- .../http/prom/src/record_response/response.rs | 19 +++------- 3 files changed, 34 insertions(+), 54 deletions(-) diff --git a/linkerd/http/prom/src/body_data/body.rs b/linkerd/http/prom/src/body_data/body.rs index d14a895610..9c1db83500 100644 --- a/linkerd/http/prom/src/body_data/body.rs +++ b/linkerd/http/prom/src/body_data/body.rs @@ -1,6 +1,5 @@ use super::metrics::BodyDataMetrics; -use http::HeaderMap; -use http_body::SizeHint; +use http_body::{Frame, SizeHint}; use pin_project::pin_project; use std::{ pin::Pin, @@ -35,34 +34,28 @@ where type Error = B::Error; /// Attempt to pull out the next data buffer of this stream. - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { + ) -> Poll, Self::Error>>> { let this = self.project(); let inner = this.inner; let BodyDataMetrics { frame_size } = this.metrics; - let data = std::task::ready!(inner.poll_data(cx)); + let frame = std::task::ready!(inner.poll_frame(cx)); - if let Some(Ok(data)) = data.as_ref() { - // We've polled and yielded a new chunk! Increment our telemetry. - // - // NB: We're careful to call `remaining()` rather than `chunk()`, which - // "can return a shorter slice (this allows non-continuous internal representation)." - let bytes = bytes::Buf::remaining(data); - frame_size.observe(linkerd_metrics::to_f64(bytes as u64)); + if let Some(Ok(frame)) = &frame { + if let Some(data) = frame.data_ref() { + // We've polled and yielded a new chunk! Increment our telemetry. + // + // NB: We're careful to call `remaining()` rather than `chunk()`, which + // "can return a shorter slice (this allows non-continuous internal representation)." + let bytes = bytes::Buf::remaining(data); + frame_size.observe(linkerd_metrics::to_f64(bytes as u64)); + } } - Poll::Ready(data) - } - - #[inline] - fn poll_trailers( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll, Self::Error>> { - self.project().inner.poll_trailers(cx) + Poll::Ready(frame) } #[inline] diff --git a/linkerd/http/prom/src/record_response.rs b/linkerd/http/prom/src/record_response.rs index 3810fd65ee..136cd82cc8 100644 --- a/linkerd/http/prom/src/record_response.rs +++ b/linkerd/http/prom/src/record_response.rs @@ -254,29 +254,27 @@ where type Data = ::Data; type Error = Error; - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { + ) -> Poll, Self::Error>>> { let mut this = self.project(); - let res = - futures::ready!(this.inner.as_mut().poll_data(cx)).map(|res| res.map_err(Into::into)); - if let Some(Err(error)) = res.as_ref() { - end_stream(this.state, Err(error)); - } else if (*this.inner).is_end_stream() { - end_stream(this.state, Ok(None)); + + // Poll the inner body for the next frame. + let poll = this.inner.as_mut().poll_frame(cx); + let frame = futures::ready!(poll).map(|res| res.map_err(Error::from)); + + match &frame { + Some(Ok(frame)) => { + if let trls @ Some(_) = frame.trailers_ref() { + end_stream(this.state, Ok(trls)); + } + } + Some(Err(error)) => end_stream(this.state, Err(error)), + None => end_stream(this.state, Ok(None)), } - Poll::Ready(res) - } - fn poll_trailers( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll, Error>> { - let this = self.project(); - let res = futures::ready!(this.inner.poll_trailers(cx)).map_err(Into::into); - end_stream(this.state, res.as_ref().map(Option::as_ref)); - Poll::Ready(res) + Poll::Ready(frame) } fn is_end_stream(&self) -> bool { diff --git a/linkerd/http/prom/src/record_response/response.rs b/linkerd/http/prom/src/record_response/response.rs index d11267aa32..ff506191d7 100644 --- a/linkerd/http/prom/src/record_response/response.rs +++ b/linkerd/http/prom/src/record_response/response.rs @@ -1,3 +1,4 @@ +use http_body::Frame; use linkerd_error::Error; use linkerd_http_box::BoxBody; use linkerd_metrics::prom::Counter; @@ -150,12 +151,12 @@ where type Data = B::Data; type Error = B::Error; - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, - ) -> Poll>> { + ) -> Poll, B::Error>>> { let mut this = self.project(); - let res = futures::ready!(this.inner.as_mut().poll_data(cx)); + let res = futures::ready!(this.inner.as_mut().poll_frame(cx)); if (*this.inner).is_end_stream() { if let Some(tx) = this.flushed.take() { let _ = tx.send(time::Instant::now()); @@ -164,18 +165,6 @@ where Poll::Ready(res) } - fn poll_trailers( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll, B::Error>> { - let this = self.project(); - let res = futures::ready!(this.inner.poll_trailers(cx)); - if let Some(tx) = this.flushed.take() { - let _ = tx.send(time::Instant::now()); - } - Poll::Ready(res) - } - fn is_end_stream(&self) -> bool { self.inner.is_end_stream() } From d1cafce134a8ae13173ed83617f645c979e28e6c Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Tue, 7 Jan 2025 00:00:00 +0000 Subject: [PATCH 14/14] chore(http/insert): upgrade to hyper 1.x Signed-off-by: katelyn martin --- linkerd/http/insert/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linkerd/http/insert/src/lib.rs b/linkerd/http/insert/src/lib.rs index 21710ae0da..173fb78eb0 100644 --- a/linkerd/http/insert/src/lib.rs +++ b/linkerd/http/insert/src/lib.rs @@ -279,7 +279,7 @@ impl Future for ResponseInsertFuture where F: TryFuture>, L: Lazy, - V: Send + Sync + 'static, + V: Clone + Send + Sync + 'static, { type Output = Result;