Skip to content

fix(rust-client): Drain discarded response bodies - #629

Open
lcian wants to merge 2 commits into
mainfrom
fix/rust-client-drain-responses
Open

lcian wants to merge 2 commits into
mainfrom
fix/rust-client-drain-responses

Conversation

@lcian

@lcian lcian commented Sep 14, 2026

Copy link
Copy Markdown
Member

The Rust client now consumes response bodies on error and on successful paths that otherwise discard them, allowing the underlying HTTP connections to return cleanly to the connection pool.
Successful GET responses remain caller-owned streams, while JSON responses continue to be consumed by deserialization.

Special case: batch multipart responses remain non-drained, as that would require buffering the whole batch response at once due to a limitation in multer.

Consume error and ignored response bodies so their HTTP connections can be reused. Keep batch multipart responses streaming because multer does not expose its underlying stream after parse errors.
@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.83117% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.10%. Comparing base (a48ebfc) to head (e302999).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
clients/rust/src/resumable.rs 0.00% 21 Missing ⚠️
clients/rust/src/get.rs 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #629      +/-   ##
==========================================
+ Coverage   89.08%   89.10%   +0.01%     
==========================================
  Files         112      114       +2     
  Lines       20560    20748     +188     
==========================================
+ Hits        18316    18487     +171     
- Misses       2244     2261      +17     
Components Coverage Δ
Rust Backend 93.53% <ø> (+0.04%) ⬆️
Rust Client 72.66% <68.83%> (-0.05%) ⬇️
Python Client 93.56% <ø> (ø)

☔ View full report in Codecov by Harness.
📢 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.

@lcian
lcian marked this pull request as ready for review September 14, 2026 16:23
@lcian
lcian requested a review from a team as a code owner September 14, 2026 16:23

@jan-auer jan-auer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What a name :)
Thanks!

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.

2 participants