Skip to content

Fix thin client connection error during slow download - #366

Merged
msivasubramaniaan merged 1 commit into
redhat-developer:mainfrom
msivasubramaniaan:fix-thin-client-slow-download-connection
Oct 6, 2026
Merged

msivasubramaniaan merged 1 commit into
redhat-developer:mainfrom
msivasubramaniaan:fix-thin-client-slow-download-connection

Conversation

@msivasubramaniaan

@msivasubramaniaan msivasubramaniaan commented Aug 27, 2026 •

Copy link
Copy Markdown
Collaborator

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.clientPresent before 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

@coderabbitai

coderabbitai Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 33afab6a-b61d-4fbe-8c5a-254bdbff4511

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

codecov-commenter commented Aug 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 34.78261% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.59%. Comparing base (71098f6) to head (f62ffa5).
⚠️ Report is 438 commits behind head on main.

Files with missing lines Patch % Lines
...com/redhat/devtools/gateway/DevSpacesConnection.kt 47.05% 7 Missing and 2 partials ⚠️
...at/devtools/gateway/DevSpacesConnectionProvider.kt 0.00% 5 Missing ⚠️
.../gateway/view/steps/DevSpacesWorkspacesStepView.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            main     #366       +/-   ##
==========================================
+ Coverage   0.00%   40.59%   +40.59%     
==========================================
  Files          4      123      +119     
  Lines         26     5318     +5292     
  Branches       0     1018     +1018     
==========================================
+ Hits           0     2159     +2159     
- Misses        26     2866     +2840     
- Partials       0      293      +293     

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

@adietish

Copy link
Copy Markdown
Collaborator

@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

@adietish
adietish force-pushed the fix-thin-client-slow-download-connection branch 4 times, most recently from e70a93b to 4a29fb1 Compare August 31, 2026 22:54
@adietish

adietish commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

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

@adietish
adietish force-pushed the fix-thin-client-slow-download-connection branch from 4a29fb1 to 0b30e10 Compare September 1, 2026 14:47

@adietish adietish left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The PR is not fixing the issue for me. It looks to me as if the changes are not sufficient: when the connection drops it needs to be reestablished, the download retried.

@msivasubramaniaan

msivasubramaniaan commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Hello @adietish,
Please have a look with the latest code. Here I have recorded the video of downloading, the download time almost 4 mins under 3MB/s and the connection error issue was resolved

CRW-11670.mp4

@adietish
adietish force-pushed the fix-thin-client-slow-download-connection branch from 5eca857 to 570634f Compare October 6, 2026 14:03
@adietish

adietish commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

rebased it.

@adietish
adietish force-pushed the fix-thin-client-slow-download-connection branch 3 times, most recently from dea146a to 0724f12 Compare October 6, 2026 19:37
On slow links the first-time JetBrains Client download exceeds the old
60s readiness waits, which surfaced "Connection Error" / "Cannot launch
client" popups.
wait until clientPresent (no wall-clock timeout); treat only
clientClosed / clientFailedToOpenProject as permanent failure so
transient presence flaps do not abort. Drop the provider's second
readiness wait; Gateway Cancel still works via checkCancelled.

Signed-off-by: Muthurajan Sivasubramanian <msivasub@redhat.com>
Signed-off-by: Andre Dietisheim <adietish@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@adietish
adietish force-pushed the fix-thin-client-slow-download-connection branch from 0724f12 to f62ffa5 Compare October 6, 2026 19:44

@adietish adietish left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Awesomeness, now things work. Thanks!
Amended minor additional fixes.

@msivasubramaniaan
msivasubramaniaan merged commit d410869 into redhat-developer:main Oct 6, 2026
7 checks passed
@msivasubramaniaan
msivasubramaniaan deleted the fix-thin-client-slow-download-connection branch October 6, 2026 19:56
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.

3 participants