gitpod icon indicating copy to clipboard operation
gitpod copied to clipboard

fix(jetbrains): gateway plugin hands on auth issue

Open andreafalzetti opened this issue 3 years ago • 0 comments

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:

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

andreafalzetti avatar Sep 19 '22 10:09 andreafalzetti