Skip to content

[PM-37616] use new_http_client() in generators tests#1161

Merged
dani-garcia merged 1 commit into
mainfrom
ps/PM-37616-use-http-client-fn-tools
Jun 2, 2026
Merged

[PM-37616] use new_http_client() in generators tests#1161
dani-garcia merged 1 commit into
mainfrom
ps/PM-37616-use-http-client-fn-tools

Conversation

@dani-garcia
Copy link
Copy Markdown
Member

@dani-garcia dani-garcia commented Jun 2, 2026

🎟️ Tracking

PM-37616

📔 Objective

Replaced use of reqwest::Client::new() by new_http_client() in bitwarden-generators. This will ensure that all the tests in the SDK instantiate the HTTP client with the same TLS stack, and it will simplify upgrades to reqwest that require changes during client initialization, like #1091.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 2, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

🔍 SDK Breaking Change Detection

SDK Version: ps/PM-37616-use-http-client-fn-tools (42eb2ba)

⚠️ If breaking changes are detected, a corresponding pull request addressing them must be ready for merge in the affected client repository.

Client Status Details
typescript ✅ No breaking changes detected Compilation passed with new SDK version - View Details
android ✅ No breaking changes detected Compilation passed with new SDK version - View Details

Breaking change detection uses the build of the SDK from this branch, including any incompatibities pre-existing on or merged into this branch. Check the workflow logs to confirm.
Results update as workflows complete.

@dani-garcia dani-garcia added the ai-review-vnext Request a Claude code review using the vNext workflow label Jun 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR is a mechanical, test-only refactor in bitwarden-generators that swaps reqwest::Client::new() for new_http_client() from bitwarden-api-base across all six username forwarder test modules (Addy.io, DuckDuckGo, Fastmail, Firefox Relay, Forward Email, SimpleLogin). The change aligns test HTTP client construction with the rest of the SDK, ensuring a consistent TLS stack and simplifying future reqwest upgrades (e.g. #1091). bitwarden-api-base is added as a workspace dev-dependency only.

Code Review Details

No findings. The refactor is type-equivalent at every call site (both expressions yield reqwest::Client), confined to #[cfg(test)] modules, and grep confirms no remaining reqwest::Client::new() call sites in the crate. bitwarden-api-base is an existing internal workspace crate, so the new dev-dependency does not require AppSec approval. The Cargo.lock update matches the manifest change exactly.

@dani-garcia dani-garcia marked this pull request as ready for review June 2, 2026 17:23
@dani-garcia dani-garcia requested review from a team as code owners June 2, 2026 17:23
@dani-garcia dani-garcia requested a review from djsmith85 June 2, 2026 17:23
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.11%. Comparing base (32c0f16) to head (42eb2ba).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1161   +/-   ##
=======================================
  Coverage   84.11%   84.11%           
=======================================
  Files         446      446           
  Lines       58817    58817           
=======================================
  Hits        49476    49476           
  Misses       9341     9341           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dani-garcia dani-garcia merged commit b0d6891 into main Jun 2, 2026
79 checks passed
@dani-garcia dani-garcia deleted the ps/PM-37616-use-http-client-fn-tools branch June 2, 2026 20:59
bw-ghapp Bot added a commit to bitwarden/sdk-swift that referenced this pull request Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review-vnext Request a Claude code review using the vNext workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants