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

"Workspace does not exist" when failing to connect to ssh remote #135331

Closed
roblourens opened this issue Oct 18, 2021 · 8 comments
Closed

"Workspace does not exist" when failing to connect to ssh remote #135331

roblourens opened this issue Oct 18, 2021 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders remote Remote system operations issues under-discussion Issue is under discussion for relevance, priority, approach verified Verification succeeded
Milestone

Comments

@roblourens
Copy link
Member

  • SSH "Connect to host"
  • Type some random host name that doesn't exist
  • Get the first dialog that I couldn't attach to that host
  • Get a second dialog, "workspace does not exist"

image

@bpasero
Copy link
Member

bpasero commented Oct 19, 2021

@roblourens this was an intentional change to help Codespaces users. If you manage to open a folder in your Codespace and later delete that folder, you would always end up in that folder (because we restore the last opened folder when you just open that Codespace).

Locally, we have a way to check if a local folder still exists and then fallback to an empty window before even opening the workbench but we cannot do that with remote.

What in particular is the issue here? The 2 dialogs?

@bpasero bpasero added info-needed Issue requires more information from poster remote Remote system operations issues labels Oct 19, 2021
@bpasero
Copy link
Member

bpasero commented Oct 19, 2021

Related issue: #133872

@roblourens
Copy link
Member Author

roblourens commented Oct 19, 2021

In the SSH scenario, the workspace does exist, you just can't connect to it, and now there is a distraction from the accurate error message we just showed.

@roblourens
Copy link
Member Author

Maybe I confused it by using an example with an ssh remote that doesn't exist. Another example is if you type the password wrong or can't connect for another reason.

@bpasero bpasero added this to the October 2021 milestone Oct 19, 2021
@bpasero
Copy link
Member

bpasero commented Oct 19, 2021

🤔 should this be limited to web only?

@jkeech @GideonCheruiyot thoughts?

@bpasero bpasero added under-discussion Issue is under discussion for relevance, priority, approach and removed info-needed Issue requires more information from poster labels Oct 19, 2021
@jkeech
Copy link
Member

jkeech commented Oct 19, 2021

🤔 should this be limited to web only?

@jkeech @GideonCheruiyot thoughts?

For Codespaces, we want the behavior in both web and desktop. The same scenario is applicable to both: the user is connected to a folder in their codespace, and then the folder is renamed/deleted while they are connected (either intentionally or accidentally or by doing a git pull which includes a commit that renames the folder, etc). After the user disconnects and reconnect, we don't want VS Code to fail to connect which sort of locks them out of the codespace without a clear path to get back in.

@bpasero
Copy link
Member

bpasero commented Oct 20, 2021

Yeah agree.

@roblourens so the point here is to inform the user that the workspace he is in is invalid and that he needs to open something else. If you have a suggestion how to change this, please let me know. Maybe the remote service could tell me that even though there is a remote connection, the connection is not properly established due to failing connection or bad credentials?

//cc @misolori

@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Oct 20, 2021
@bpasero
Copy link
Member

bpasero commented Oct 20, 2021

We now only show this dialog when we have a healthy remote connection via this trick:

remoteAgentService.getEnvironment().then(remoteEnv => {
if (remoteEnv) {
// we use the presence of `remoteEnv` to figure out
// if we got a healthy remote connection
// (see https://github.com/microsoft/vscode/issues/135331)
this.validateRemoteWorkspace();
}
});

@roblourens roblourens added the verified Verification succeeded label Oct 27, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders remote Remote system operations issues under-discussion Issue is under discussion for relevance, priority, approach verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants
@roblourens @jkeech @bpasero and others