Skip to content

Conversation

@scottgerring
Copy link
Member

Fixes #2994 using Paul's suggestion to implement a priority ordering for the HTTP clients when multiple are enabled.

Design discussion issue (if applicable) #

Changes

Please provide a brief description of the changes here.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.8%. Comparing base (65969fd) to head (acaffa1).

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3280     +/-   ##
=======================================
+ Coverage   80.7%   80.8%   +0.1%     
=======================================
  Files        129     129             
  Lines      23210   23177     -33     
=======================================
  Hits       18748   18748             
+ Misses      4462    4429     -33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@scottgerring scottgerring marked this pull request as ready for review December 5, 2025 11:35
@scottgerring scottgerring requested a review from a team as a code owner December 5, 2025 11:35
// When multiple HTTP client features are enabled, we use a priority order
// to select the client. This follows Rust's feature unification principle
// where features should be additive. Priority (highest to lowest):
// 1. reqwest-client (async)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this priority decided? The default we use is the blocking-client (since the detail is the dedicated thread model..). But this order is reverse...

Copy link
Member Author

@scottgerring scottgerring Dec 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thinking is that when you explicitly turn on another client feature, that feature should win. Because blocking is the default feature if it appears first in the fallthrough here users wouldn’t be able to simply toggle on the feature, they’d have to also turn off default. As Leo points out in the issue this’d be counterintuitive. WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: NoHttpClient error when reqwest-client feature is enabled

2 participants