Skip to content

feat(sdk): support per-request timeout to TCP/QUIC/WebSocket clients#3429

Open
chengxilo wants to merge 15 commits into
apache:masterfrom
chengxilo:client-timeout
Open

feat(sdk): support per-request timeout to TCP/QUIC/WebSocket clients#3429
chengxilo wants to merge 15 commits into
apache:masterfrom
chengxilo:client-timeout

Conversation

@chengxilo

@chengxilo chengxilo commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR address?

Closes #3419

Rationale

Clients had no deadline on individual request, so a stalled server could block a caller forever.

What changed?

send_raw would be blocked forever if server doesn't response. I added a request_timeout field (IggyDuration, default 300s) to TcpClientConfig, QuicClientConfig, and WebSocketClientConfig. Each client's send_raw now wraps its I/O in tokio::time::timeout

Local Execution

  • Passed
  • Pre-commit hooks ran

AI Usage

  1. Claude Opus 4.6
  2. implementation
  3. manually reviewed
  4. Yes

Change Log

By default, Iggy Rust SDK would have a 30s timeout for each request.

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Thanks for the PR. It is labeled S-waiting-on-review and queued for review.

Slash commands (own line, regular comment) move it around the queue:

  • /ready - back to S-waiting-on-review after addressing feedback
  • /author - flip to S-waiting-on-author while you finish changes
  • /request-review @user-or-team - request a reviewer

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Jun 6, 2026
@codecov

codecov Bot commented Jun 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.57895% with 81 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.65%. Comparing base (9a0f799) to head (99b1df6).

Files with missing lines Patch % Lines
core/sdk/src/quic/quic_client.rs 57.89% 13 Missing and 3 partials ⚠️
core/sdk/src/websocket/websocket_client.rs 76.27% 9 Missing and 5 partials ⚠️
core/sdk/src/client_provider.rs 65.78% 5 Missing and 8 partials ⚠️
core/sdk/src/tcp/tcp_client.rs 77.96% 7 Missing and 6 partials ⚠️
core/sdk/src/clients/client_builder.rs 0.00% 12 Missing ⚠️
...tion/quic_config/quic_connection_string_options.rs 69.23% 2 Missing and 2 partials ⚠️
...ration/tcp_config/tcp_connection_string_options.rs 69.23% 2 Missing and 2 partials ⚠️
core/common/src/types/args/mod.rs 25.00% 1 Missing and 2 partials ⚠️
...cket_config/websocket_connection_string_options.rs 71.42% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3429      +/-   ##
============================================
- Coverage     74.70%   72.65%   -2.06%     
  Complexity      937      937              
============================================
  Files          1257     1257              
  Lines        124910   120315    -4595     
  Branches     100583    96034    -4549     
============================================
- Hits          93312    87410    -5902     
- Misses        28595    29643    +1048     
- Partials       3003     3262     +259     
Components Coverage Δ
Rust Core 73.19% <71.57%> (-2.53%) ⬇️
Java SDK 58.57% <ø> (ø)
C# SDK 71.40% <ø> (-0.65%) ⬇️
Python SDK 88.88% <ø> (ø)
PHP SDK 84.29% <ø> (ø)
Node SDK 91.35% <ø> (+0.12%) ⬆️
Go SDK 40.36% <ø> (ø)
Files with missing lines Coverage Δ
core/common/src/error/iggy_error.rs 100.00% <ø> (ø)
...es/configuration/quic_config/quic_client_config.rs 100.00% <100.00%> (ø)
...guration/quic_config/quic_client_config_builder.rs 36.60% <100.00%> (+7.60%) ⬆️
...ypes/configuration/tcp_config/tcp_client_config.rs 100.00% <100.00%> (ø)
...figuration/tcp_config/tcp_client_config_builder.rs 71.55% <100.00%> (+3.51%) ⬆️
...ration/websocket_config/websocket_client_config.rs 62.35% <100.00%> (+0.90%) ⬆️
...ebsocket_config/websocket_client_config_builder.rs 37.96% <100.00%> (+7.75%) ⬆️
...cket_config/websocket_connection_string_options.rs 58.51% <71.42%> (+0.70%) ⬆️
core/common/src/types/args/mod.rs 45.51% <25.00%> (-0.54%) ⬇️
...tion/quic_config/quic_connection_string_options.rs 69.07% <69.23%> (+0.01%) ⬆️
... and 6 more

... and 123 files with indirect coverage changes

🚀 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.

Comment thread core/common/src/types/configuration/quic_config/quic_client_config.rs Outdated
Comment thread core/sdk/src/tcp/tcp_client.rs Outdated
Comment thread core/sdk/src/websocket/websocket_client.rs Outdated
Comment thread core/sdk/src/tcp/tcp_client.rs
Comment thread core/sdk/src/quic/quic_client.rs Outdated
Comment thread core/common/src/types/configuration/tcp_config/tcp_client_config.rs Outdated
Comment thread core/sdk/src/tcp/tcp_client.rs Outdated
Comment thread core/sdk/src/client_provider.rs Outdated
Comment thread core/common/src/types/configuration/tcp_config/tcp_client_config.rs Outdated
Comment thread core/common/src/types/configuration/tcp_config/tcp_client_config.rs
@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Jun 9, 2026
@chengxilo chengxilo requested a review from hubcio June 17, 2026 01:08
@chengxilo

Copy link
Copy Markdown
Contributor Author

/ready

@github-actions github-actions Bot added S-waiting-on-review PR is waiting on a reviewer and removed S-waiting-on-author PR is waiting on author response labels Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review PR is waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support per-request timeout to TCP/QUIC/WebSocket clients

2 participants