Skip to content
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions remote-ssh-stable-commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
The Remote-SSH extension is a private repo that other extensions rely on for varying functionality. Below is a list of commands that we will comitt to keeping stable like an API. These commands, now published externally here, will be maintained and changes will not be made without sufficient warning to allow for other dependent extensions to function correctly.
Copy link
Member

Choose a reason for hiding this comment

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

commit

Copy link
Member

Choose a reason for hiding this comment

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

Don't say that we'll make breaking changes but warn extension authors about it. That conflicts with saying that we are committing to keeping it stable. We shouldn't make breaking changes.

Copy link
Member

Choose a reason for hiding this comment

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

There is still a typo for commit




## Remote-SSH Stable Commands:

`opensshremotes.openEmptyWindow` - Opens a new window and attempts to connect to the remote provided through the `args`
- parameters: [`(args?: IOpenWindowsArgs)`](#IOpenWindowsArgs-Definition)

### My Multi Word Header
- returns: none
- this command is called with the command palette command "Connect to Host.."

`opensshremotes.openEmptyWindowInCurrentWindow` - Attempts to connect to the remote provided through the `args` argument but in the current VS Code window
- parameters: [`(args?: IOpenWindowsArgs)`](#IOpenWindowsArgs-Definition)
- returns: none
- this command is called with the command palette command "Connect Current Window to Host..."


`opensshremotes.cleanRemoteServer` - This command shuts down and uninstall the VS Code server on the remote. A complete uninstall includes removing the entire folder with the server data. This server data includes logs, the server data needed for future reconnection, any unsaved progress of files on the remote machine, and ... This command causes the [`interactivelyPickSshHost`](#Interactively-Pick-Ssh-Host) to engage, see below for details on how this picker works.
- parameters: none
- returns: none
- this command is called with the command palette command "Kill VS Code Server on Host..."

`opensshremotes.cleanDevBox` - This command uninstalls the Vs Code server on the remote. This command causes the [`interactivelyPickSshHost`](#Interactively-Pick-Ssh-Host) to engage, see below for details on how this picker works.
- parameters: none
- returns: none
- this command is called with the command palette command "Uninstall VS Code Server from Host..."
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think I full understand how cleanRemoteServer and cleanDevBox differ. From my understanding, it is just that cleanDevBox logs the output of this action, runs showInformationMessage to pop up info and handles the cleaning in a try-catch block which displays an additional message back to the user based on success / failure. I would want to have a clear distinction between the two in this doc so help clarifying would be great.

Copy link
Member

@roblourens roblourens Feb 17, 2023

Choose a reason for hiding this comment

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

The naming isn't great, but cleanRemoteServer only deletes the server bits that were installed, while cleanDevBox deletes everything including remote extensions and user data

https://github.com/microsoft/vscode-remote-ssh/blob/7d7471b56c345ab22e1bf391126f86722dcacba4/open-ssh-remote/src/clean-remote.ts#L55

I think that nice logging that you noticed should have been added to both




## Interface Definitions

##### IOpenWindowsArgs Definition
Copy link
Member

Choose a reason for hiding this comment

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

Why does this go from a level 2 to level 5 markdown header?

```
interface IOpenWindowsArgs {
host: string;
userName?: string;
port?: number;
}
```
##### Interactively Pick Ssh Host

`interactivelyPickSshHost` This is an additional function which is called by both `opensshremotes.cleanRemoteServer` and `opensshremotes.cleanDevBox`. This command causes an interactive popup to appear where the user will then select from their list of remotes which one they want to kill the server on. The remotes displayed in the interactive popup are collected from parsing the ssh config file and therefore all remotes listed in the ssh config will be displayed as options.