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

Ensure VS Code Desktop can reconnect to workspace after timeout #10288

Closed
tysonrm opened this issue May 26, 2022 · 11 comments
Closed

Ensure VS Code Desktop can reconnect to workspace after timeout #10288

tysonrm opened this issue May 26, 2022 · 11 comments

Comments

@tysonrm
Copy link

tysonrm commented May 26, 2022

Is your feature request related to a problem? Please describe

Yes, having selected local IDE, when workspace times out, IDE can't reconnect (because it doesn't know to restart the workspace.)

Describe the behaviour you'd like

A customization to VSCode and other popular IDEs that restarts the workspace before attempting to reconnect to it.

Describe alternatives you've considered

A ping to prevent the workspace from timing out.

I'm very busy but it might be worth it to contribute if I get some guidance on this. Love your platform. Excellent work!

Additional context

@tysonrm tysonrm changed the title Ensure local IDE can reconnect to workspace after it times out. Ensure local IDE can reconnect to workspace after timeout. May 28, 2022
@tysonrm tysonrm changed the title Ensure local IDE can reconnect to workspace after timeout. Ensure local IDE can reconnect to workspace after timeout May 28, 2022
@axonasif axonasif added type: feature request New feature or request team: IDE labels May 30, 2022
@iojcde
Copy link

iojcde commented Jun 1, 2022

A solution to this issue may be something where a dialog pops up when a workspace times out, similar to how GitHub Codespaces does it.

Just having a button to restart the workspace easily would be great (#4782 may be related to this solution).

@loujaybee
Copy link
Member

Thanks for raising @tysonrm ! 🙏

It won't be solved by, but relates to:

@loujaybee loujaybee removed this from 🚀 IDE Team Jun 1, 2022
@tysonrm
Copy link
Author

tysonrm commented Jun 3, 2022

A potential solution: intercept ssh requests in k8 ingress controller, check/restart targeted workspace, foward ssh.

@narkeeso
Copy link

Is there a workaround for this for now? Is there a way to extract the password from the new workspace link and then give it to vscode to just resume?

@david-bakin
Copy link

Is there a workaround for this for now? Is there a way to extract the password from the new workspace link and then give it to vscode to just resume?

I tried getting the password out of the ssh link from the dashboard and providing that to the dialog asking for the password - but it didn't work. In fact, it looked from the prompt in the dialog that somehow the password (or what I thought was the password, between # and @) was incorporated into the ssh remote extension's idea of the hostname. I'd really like to be able to do this.

@loujaybee loujaybee changed the title Ensure local IDE can reconnect to workspace after timeout Ensure VS Code Desktop can reconnect to workspace after timeout Jul 6, 2022
@jeanp413
Copy link
Member

@narkeeso @david-bakin with pre-release version of gitpod-desktop extension and configuring your ssh keys in Gitpod it won't ask you for a password anymore when reconnecting after a workspace restart
image

@david-bakin
Copy link

david-bakin commented Jul 16, 2022

@narkeeso @david-bakin with pre-release version of gitpod-desktop extension and configuring your ssh keys in Gitpod it won't ask you for a password anymore when reconnecting after a workspace restart

@jeanp413 - Took me a second to figure it out - you still get a "enter your password" prompt at the top of VSCode but you ignore it and click the "Reload Window" button down at the bottom right - and your restarted workspace hooks right up. 👍

@jeanp413
Copy link
Member

you still get a "enter your password" prompt at the top of VSCode

Good catch @david-bakin I created an issue for that bug #11428

@loujaybee
Copy link
Member

As @jeanp413 mentioned, if you're using the SSH Gateway with an uploaded SSH key VS Code should be able to reconnect when you start / restart the workspace (see: related docs).

To configure:

  1. Set gitpod.remote.useLocalApp to false in your settings
  2. Upload an SSH Key to Gitpod

This doesn't entirely solve the problem as you'll still have to go to the workspace stop page or dashboard to restart the workspace, and it indeed would be nice if VS Code could wake up your workspace for you. However, I think the other suggestions are captured in:

Prompt for users when workspace stopping:

Ensure user can restart workspace from within VS Code:

So I will close this issue 🙏

@iojcde
Copy link

iojcde commented Aug 16, 2022

Still doesn't work when the cluster changes :(

@loujaybee
Copy link
Member

loujaybee commented Aug 18, 2022

Still doesn't work when the cluster changes :(

Hey @iojcde thanks for raising the feedback

Cluster name changes is a known current limitation, and is raised here:

If you have any other thoughts, would like to track the issue or upvote to raise more visibility 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants