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

chore: Rename show_ssh_command in CLI and add message for VSCode WSL Users #8387

Merged
merged 14 commits into from
Dec 7, 2023

Conversation

MikhailKardash
Copy link
Contributor

@MikhailKardash MikhailKardash commented Nov 9, 2023

Description

Windows Users are having issues with VSCode remote-ssh integration. This is due to Windows defaulting to CMD with OpenSSH instead of using WSL bash and the proper ssh tool for the job. Adding warning to CLI and also changing det shell show_ssh_command to det shell show-ssh-command

Test Plan

Start a remote shell.

  1. Be a Windows user

  2. det shell show-ssh-command should show a VSCode-specific warning in WSL shell.

  3. Be any user

  4. det shell show_ssh_command should show a deprecation warning.

Commentary (optional)

This should address #7726

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

Ticket

MLG-871

@cla-bot cla-bot bot added the cla-signed label Nov 9, 2023
Copy link

netlify bot commented Nov 9, 2023

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit bc492a1
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/6572142b868cf00008f978bb

@determined-ci determined-ci added the documentation Improvements or additions to documentation label Nov 9, 2023
@determined-ci determined-ci requested a review from a team November 9, 2023 21:49
@MikhailKardash MikhailKardash marked this pull request as ready for review November 9, 2023 21:49
Copy link
Member

@tara-det-ai tara-det-ai left a comment

Choose a reason for hiding this comment

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

suggested edits

@determined-ci determined-ci requested a review from a team November 13, 2023 17:59
@sirredbeard
Copy link
Contributor

cc @ighodgao

Comment on lines 30 to 32
############################
Addendum for Windows Users
############################
Copy link
Member

Choose a reason for hiding this comment

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

are these instructions really a good idea?

To me, these instructions are basically so difficult that we may as well just say "you can't run --show-ssh-command from inside wsl; that's not supported". Having to follow these instructions for every shell a user starts is crazy.

Alternatively, we could detect if we were inside wsl in the python code:

if "WSL" in os.uname().release:
    ...

Though I'm not sure if this affects enough users to fix it. It probably does affect enough users that we could emit a warning when somebody asks for --show-ssh-command within WSL though, that's probably the lower-limit on what a fix should entail.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think there's value in having documentation for users who REALLY want to use this feature. I like adding the warning and adding a disclaimer to the docs along the lines of "we do not recommend doing this"

Copy link
Member

Choose a reason for hiding this comment

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

I'd much prefer telling those users "install just determined in not-wsl for this feature". That's two sentences and it's actually usable for end users.

@determined-ci determined-ci requested a review from a team December 1, 2023 22:01
@MikhailKardash MikhailKardash requested a review from a team as a code owner December 1, 2023 23:14
@determined-ci determined-ci removed the documentation Improvements or additions to documentation label Dec 1, 2023
@@ -90,6 +90,14 @@ def show_ssh_command(args: Namespace) -> None:
)


@authentication.required
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is necessary, since the next function you call is already wrapped (right?)

I think it might actually cause additional network traffic, so I think it's not harmless.

Copy link
Member

@rb-determined-ai rb-determined-ai left a comment

Choose a reason for hiding this comment

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

wait... did the warning for vscode users disappear somewhere? I swear you had it written once but I don't see it now...

@MikhailKardash MikhailKardash changed the title docs: Add VSCode Addendum for Windows Users chore: Rename show_ssh_command in CLI and add message for VSCode Users Dec 7, 2023
@MikhailKardash MikhailKardash changed the title chore: Rename show_ssh_command in CLI and add message for VSCode Users chore: Rename show_ssh_command in CLI and add message for VSCode WSL Users Dec 7, 2023
@MikhailKardash MikhailKardash merged commit 8d3f6fb into main Dec 7, 2023
70 of 83 checks passed
@MikhailKardash MikhailKardash deleted the vscode_windows branch December 7, 2023 19:33
@dannysauer dannysauer added this to the 0.26.7 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants