fix(desktop): add retry logic with exponential backoff to health check system#24138
fix(desktop): add retry logic with exponential backoff to health check system#24138herjarsa wants to merge 1 commit into
Conversation
…k system - Add check_health_with_retry() with up to 6 attempts - Implement backoff_interval() helper (500ms -> 1s -> 2s -> 4s -> 4s) - Add 2s timeout per attempt with tokio::time::timeout - Build reqwest::Client once before loop (connection pool reuse) - Retry on transient errors (network/timeout) via match instead of short-circuiting with ? - Apply no_proxy() to skip proxy for localhost health checks - Keep max total duration ~23.5s within caller's 30s timeout - Remove dead unreachable code and unused variables
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, here are the potentially related PRs (excluding the current PR #24138): Related PRs Found
These appear to be adjacent improvements to the health check system rather than direct duplicates. PR #24138 adds robustness through retry logic, while the others address specific health check issues (credentials and auth middleware). |
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Fixes #24142
Add retry logic with exponential backoff to the desktop app health check system to improve stability during server startup.
Why
The local server sidecar sometimes fails health checks during startup, especially on slower systems or when the server is still initializing. This causes IDE stability issues (MCP local connections disconnect/reconnect, IDE freezes when switching sessions).
What
o_proxy() for localhost to avoid proxy interference