Skip to content

Commit b8f14cb

Browse files
Bump reqwest to 0.13 (MaterializeInc#36215)
One of several sequenced PRs in the crypto migration toward rustls + aws-lc-rs for everything. Specifically: - **This PR** — mechanical bump from reqwest 0.12 → 0.13. Keeps the existing `native-tls` backend for now to scope the change to just the version bump. Does not flip the TLS backend. - **Next in the reqwest chain** — the HTTP-clients-to-rustls PR (MaterializeInc#35947 in the plan) swaps `native-tls` for `rustls` with `aws-lc-rs` across all reqwest consumers. That's where the real TLS backend change happens. - **In parallel** — the Azure SDK migration (MaterializeInc#36216, stacked on this) adopts the new `azure_core` 0.35 series, which defaults to `reqwest_rustls` + aws-lc-rs on its own; that's a concrete step forward on the Azure path even before the workspace-wide flip. - Bump `reqwest` 0.12.28 → 0.13.2, `reqwest-middleware` 0.4.2 → 0.5.1, `reqwest-retry` 0.8.0 → 0.9.1. - `default-features = false` on reqwest so the 0.13 default changes (now `default-tls = rustls`, new `system-proxy` feature) don't ambush us mid-bump. - Explicitly list the feature set we had in 0.12 (including `native-tls` / `native-tls-vendored` for now) plus the two newly-opt-in features we need: `query` (used by `cloud-api` and `frontegg-client`) and `system-proxy` (was implicit in 0.12). The `native-tls` pin here is a temporary consequence of keeping this PR scoped to the bump — the crypto migration's HTTP-clients PR is where the switch to rustls actually lands. Two places still need reqwest 0.12 because their trait ecosystem is pinned there. Both are narrow and clearly labeled; both go away as the related migrations land. 1. **`src/persist/src/azure.rs` — Azurite test path only.** The old code plumbed a custom `reqwest::Client` through `TransportOptions` inside the `if account == EMULATOR_ACCOUNT` branch to apply short `BlobKnobs` per-attempt / read / connect timeouts (5s–10s) to the Azurite test client. `azure_core` 0.21 pins reqwest 0.12 internally, so our 0.13 `Client` no longer implements its `HttpClient` trait. - **Production impact: zero.** The `else` branch (real Azure Blob Storage) never set a custom transport — it uses `BlobServiceClient::new(...)` which gets the SDK's default reqwest client. That behavior is unchanged. - **Test impact: minimal.** Azurite runs on localhost, so falling back to the SDK's default timeouts has no observable effect on test reliability. - The outer `knobs.operation_timeout()` is preserved via the retry policy's `max_total_elapsed` in both branches. - The Azure SDK 0.35 migration (MaterializeInc#36216, stacked) restores the emulator-path timeout plumbing against the new SDK. 2. **`src/storage-types/src/connections.rs` — `AwsCredentialLoad` impl.** The `reqsign::AwsCredentialLoad` trait (re-exported from iceberg) is defined against reqwest 0.12. Added a versioned `reqwest_0_12` alias dep in `[workspace.dependencies]` and use it only for the single trait-impl parameter. Removable once iceberg upstream bumps to a reqsign that supports reqwest 0.13 — tracked as a multi-hop ecosystem blocker (reqsign 0.17 was a breaking API rewrite; neither iceberg nor opendal have migrated). ~27 new packages (quinn for HTTP/3, rustls-platform-verifier, wasm-streams, newer windows-sys). Both reqwest 0.12 and 0.13 coexist in the tree — the 0.12 copy comes in via azure_core 0.21 and reqsign 0.16 and is needed only for the two workarounds above. Exempted in `deny.toml`'s skip list. - [x] `cargo check --workspace --all-targets` — clean - [x] `cargo --locked deny check bans sources` — `bans ok` - [x] `bin/lint-cargo` — exit 0 - [x] Full `cargo test` run / CI green - [ ] Smoke-test at least one TLS client path (`ccsr`, `frontegg-client`, or similar) against a real endpoint to confirm native-tls still works at 0.13 before the crypto migration's rustls switch lands 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Jason Hernandez <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 2d7f681 commit b8f14cb

7 files changed

Lines changed: 23 additions & 7 deletions

File tree

‎Cargo.toml‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,16 @@ rdkafka = { version = "0.29.0", features = ["cmake-build", "libz-static", "ssl-v
479479
rdkafka-sys = { version = "4.3.0", features = ["cmake-build", "libz-static", "ssl-vendored", "zstd"] }
480480
regex = "1.12.3"
481481
regex-syntax = "0.8.10"
482-
reqwest = { version = "0.12.28", features = ["blocking", "charset", "cookies", "default-tls", "http2", "json", "native-tls-vendored", "stream"] }
483-
reqwest-middleware = { version = "0.4.2", features = ["json"] }
484-
reqwest-retry = "0.8.0"
482+
# reqwest 0.13 changed defaults: `default-tls` now pulls in rustls
483+
# (banned) and `query`/`system-proxy` are opt-in. List features
484+
# explicitly to stay on native-tls.
485+
reqwest = { version = "0.13.4", default-features = false, features = ["blocking", "charset", "cookies", "http2", "json", "native-tls", "native-tls-vendored", "query", "stream", "system-proxy"] }
486+
# Satisfies reqsign 0.16's `AwsCredentialLoad` trait and azure_core 0.21's
487+
# `HttpClient`, both pinned to reqwest 0.12. Remove once iceberg and the
488+
# Azure SDK migration land.
489+
reqwest_0_12 = { package = "reqwest", version = "0.12", default-features = false }
490+
reqwest-middleware = { version = "0.5.2", features = ["json"] }
491+
reqwest-retry = "0.9.1"
485492
rlimit = "0.11.0"
486493
rocksdb = { version = "0.24.0", default-features = false, features = ["lz4", "snappy", "zstd"] }
487494
ropey = "1.6.1"

‎deny.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ skip = [
150150
{ name = "hashlink", version = "0.9.1" },
151151
# held back by owo-colors 4.3 (mz-deploy terminal styling)
152152
{ name = "supports-color", version = "2.1.0" },
153+
# reqwest_0_12 workspace alias; see Cargo.toml.
154+
{ name = "reqwest", version = "0.12" },
153155
]
154156

155157
[[bans.deny]]

‎src/persist/Cargo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ proptest-derive.workspace = true
6060
prost.workspace = true
6161
rand = { workspace = true, features = ["small_rng"] }
6262
reqwest.workspace = true
63+
reqwest_0_12.workspace = true
6364
serde.workspace = true
6465
serde_json = { workspace = true, optional = true }
6566
timely.workspace = true

‎src/persist/src/azure.rs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ impl AzureBlobConfig {
5959
url: Url,
6060
knobs: Box<dyn BlobKnobs>,
6161
) -> Result<Self, Error> {
62+
// azure_core 0.21 implements `HttpClient` only for reqwest 0.12, so
63+
// this transport client comes from the `reqwest_0_12` alias. Moves to
64+
// the workspace reqwest when the Azure SDK migration lands.
6265
let transport = TransportOptions::new(Arc::new(
63-
reqwest::ClientBuilder::new()
66+
reqwest_0_12::ClientBuilder::new()
6467
.timeout(knobs.operation_attempt_timeout())
6568
.read_timeout(knobs.read_timeout())
6669
.connect_timeout(knobs.connect_timeout())

‎src/storage-types/Cargo.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ prost.workspace = true
6666
rdkafka.workspace = true
6767
regex.workspace = true
6868
reqwest.workspace = true
69+
# For impls of `iceberg::io::AwsCredentialLoad` (reqsign 0.16); see workspace Cargo.toml.
70+
reqwest_0_12 = { workspace = true }
6971
serde.workspace = true
7072
serde_json = { workspace = true, features = ["preserve_order"] }
7173
thiserror.workspace = true

‎src/storage-types/src/connections.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ impl AwsSdkCredentialLoader {
115115
impl AwsCredentialLoad for AwsSdkCredentialLoader {
116116
async fn load_credential(
117117
&self,
118-
_client: reqwest::Client,
118+
// reqsign 0.16 trait signature; see `reqwest_0_12` in workspace Cargo.toml.
119+
_client: reqwest_0_12::Client,
119120
) -> anyhow::Result<Option<AwsCredential>> {
120121
let creds = self
121122
.provider

‎test/testdrive/webhook.td‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ will_work
296296

297297
> CREATE SOURCE webhook_text_headers_block_list IN CLUSTER webhook_cluster FROM WEBHOOK
298298
BODY FORMAT TEXT
299-
INCLUDE HEADERS (NOT 'accept', NOT 'host')
299+
INCLUDE HEADERS (NOT 'accept', NOT 'accept-encoding', NOT 'host')
300300

301301
$ webhook-append name=webhook_text_headers_block_list
302302
foo
@@ -318,7 +318,7 @@ anotha_one "{x-random=>bar}"
318318
BODY FORMAT TEXT
319319
INCLUDE HEADER 'x-timestamp' as event_timestamp
320320
INCLUDE HEADER 'x-id' as event_id
321-
INCLUDE HEADERS (NOT 'accept', NOT 'content-length', NOT 'host', NOT 'x-api-key')
321+
INCLUDE HEADERS (NOT 'accept', NOT 'accept-encoding', NOT 'content-length', NOT 'host', NOT 'x-api-key')
322322
CHECK ( WITH (HEADERS) headers->'x-api-key' = 'abc123' )
323323

324324
$ webhook-append name=webhook_text_filtering_headers x-timestamp=100 x-id=a x-api-key=abc123 content-type=text/example

0 commit comments

Comments
 (0)