dev: upgrade reqwest 0.11 -> 0.12 to deduplicate the HTTP stack - #588
Open
sshaplygin wants to merge 1 commit into
Open
dev: upgrade reqwest 0.11 -> 0.12 to deduplicate the HTTP stack#588sshaplygin wants to merge 1 commit into
sshaplygin wants to merge 1 commit into
Conversation
reqwest 0.11 is built on hyper 0.14, so the dependency tree carried two parallel HTTP stacks: tonic's hyper 1.7 / http 1.3 / rustls 0.23 next to reqwest's hyper 0.14 / http 0.2 / rustls 0.21. reqwest is used only for the two blocking token requests in `credentials.rs`, and its blocking API is unchanged between 0.11 and 0.12, so the upgrade needs no source changes. Effect on `cargo tree -p ydb -e normal`: - crates with more than one version: 22 -> 9 - hyper 0.14 + 1.7 -> 1.7, http 0.2 + 1.3 -> 1.3, rustls 0.21 + 0.23 -> 0.23, base64 0.21 + 0.22 -> 0.22; h2, http-body, tokio-rustls, rustls-webpki and webpki-roots also collapse to a single version - total crates: 292 -> 272 `ring` remains the only rustls crypto provider in the tree, so rustls 0.23 keeps resolving a default provider; verified with a temporary HTTPS smoke test against the crate's own feature set. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #588 +/- ##
==========================================
- Coverage 86.91% 86.86% -0.06%
==========================================
Files 198 198
Lines 19492 19492
==========================================
- Hits 16941 16931 -10
- Misses 2551 2561 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
+1 Old reqwest downgrades rustls-webpki to v0.101.7, which doesn't have It's also possible to bump it to "0.13" if opentelemetry is installed from the current main branch. Done it here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
reqwest 0.11is built onhyper 0.14, so the dependency tree carried two parallel HTTP stacks — tonic'shyper 1.7/http 1.3/rustls 0.23alongside reqwest'shyper 0.14/http 0.2/rustls 0.21. Downstream users compile, link and audit both.Change
Bump
reqwestto 0.12. No source changes are required: reqwest is used only for the two blocking token requests incredentials.rs, and its blocking API is unchanged between 0.11 and 0.12. The feature set (blocking,json,rustls-tls,default-features = false) is valid in 0.12 with the same meaning.Effect on
cargo tree -p ydb -e normalhyper0.14 + 1.7 → 1.7;http0.2 + 1.3 → 1.3;rustls0.21 + 0.23 → 0.23;base640.21 + 0.22 → 0.22h2,http-body,tokio-rustls,rustls-webpki,webpki-roots,sync_wrapper,bitflagsandcore-foundationalso collapse to a single versionRisk checked
rustls 0.23 panics at runtime if more than one crypto provider is compiled in. Verified
ringis still the only provider in the tree — noaws-lc-rs— and reqwest now shares tonic's singlerustls 0.23instance rather than configuring its own 0.21.Because a provider fault surfaces only at request time, this was also confirmed with a temporary HTTPS smoke test built against the crate's exact feature resolution; it passed and was removed before commit.
Verification
🤖 Generated with Claude Code