Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(jetbrains): gateway plugin hands on auth issue #13080

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

andreafalzetti
Copy link
Contributor

@andreafalzetti andreafalzetti commented Sep 19, 2022

Description

This PR aims to improve the user experience when connecting to a workspace using an expired token: The JB Gateway plugin refreshes the token, however while handling the first failed request exepction, the ClientContainer will hang for about 30 seconds while stopping.

After investigating deep into the implementation, we believe that the time is given to any existing client connection to be shutdown gracefully. By setting the stop timeout to zero, we effectively revoke this opportunity, however, in our case, we are confident that there are no more active connections so we can safely remove this period of time, which only slows down the opening of the IDE.

Related Issue(s)

Fixes #12862

How to test

  1. Install this version of the JB Gateway Plugin
  2. Start a workspace in this prev env
  3. Open the workspace with any JetBrains IDE (any version)
  4. Observe how everything works as expected
  5. Now open a workspace for gitpod in gitpod.io
  6. Connect to the prev env database and delete the token
  7. Close the JB Gateway and therefore any IDE windows
  8. Delete the token from the database
  9. Re-open the prev env workspace and observe how it re-opens without any delays. Especially once the JetBrains Gateway opens, there should not be any unexpected delay before the IDE opens.

Release Notes

JetBrains Gateway: Avoid 30 seconds delay when connecting to a workspace using an expired token

Documentation

Werft options:

  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide

@andreafalzetti andreafalzetti force-pushed the af/fix-12862-gateway-auth-issue branch from 2c5c2d4 to e8496ee Compare September 21, 2022 17:20
@andreafalzetti andreafalzetti marked this pull request as ready for review September 21, 2022 17:43
@andreafalzetti andreafalzetti requested a review from a team September 21, 2022 17:43
@felladrin
Copy link
Contributor

felladrin commented Sep 22, 2022

ℹ️ I'm reviewing it now!

Copy link
Contributor

@felladrin felladrin left a comment

Choose a reason for hiding this comment

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

Working great! Was able to reconnect instantly, after invalidating the token.

image

@roboquat roboquat merged commit 8bd040d into main Sep 22, 2022
@roboquat roboquat deleted the af/fix-12862-gateway-auth-issue branch September 22, 2022 09:18
@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed Change is completely running in production editor: jetbrains release-note size/XS team: IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[jetbrains] gateway hangs to connect sometimes
3 participants