Fix thin client connection error during slow download - #366
Fix thin client connection error during slow download#366msivasubramaniaan wants to merge 2 commits into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #366 +/- ##
==========================================
+ Coverage 0.00% 38.87% +38.87%
==========================================
Files 4 121 +117
Lines 26 5291 +5265
Branches 0 1016 +1016
==========================================
+ Hits 0 2057 +2057
- Misses 26 2948 +2922
- Partials 0 286 +286 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@msivasubramaniaan can you please add (CRW-11670) to the commit message (ex. "Fix thin client connection error during slow download (CRW-11670)")? That helps to identify the jira issue when looking at the commits. Thanks |
e70a93b to
4a29fb1
Compare
|
@msivasubramaniaan: Your fix is solid. It looks to me though as if the issue still happens: Playing around with it while clearing the client cache, made me hit the issue. Investigating. |
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
A transient present→absent→present no longer exits: The loop keeps polling until clientPresent == true && connectFailed == false hold simultaneously. Replaced the latched connectWaitDone flag with a connectFailed flag that signals permanent failure (clientClosed / clientFailedToOpenProject). Rewrote waitForThinClientConnect to poll clientPresent directly inside a withTimeout loop, removing the redundant onClientPresenceChanged listener. The new loop tolerates transient absence flaps while failing fast on permanent close and still timing out after 60s. added unit tests for DevSpacesConnection connect/teardown logic (crw-11670) - waitForThinClientConnect: happy path, timeout, transient flap, connectFailed - onThinClientClosed: teardown when live vs no-op when not live - Expose CONNECT_TIMEOUT and timeoutMs param for test injection Signed-off-by: adietish <adietish@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
4a29fb1 to
0b30e10
Compare
fixes https://redhat.atlassian.net/browse/CRW-11670
Fixed a premature JetBrains Client connection failure during client binary download on slow network connections.
The connection wait now checks
thinClient.clientPresentbefore considering a presence change as a successful client startup. This prevents intermediate presence changes during the download process from triggering Connection Error / Cannot launch client popups. Also added a check for the case where the client is already present before the presence listener is registered.Additionally resolved the warnings of the file