Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: handleworkspace.agent andagent.workspace.owner incoder ssh#18093

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethanndickson merged 1 commit intomainfromethan/extra-ssh-input-cases
May 29, 2025

Conversation

@ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedMay 29, 2025
edited
Loading

Closes#18088.

The linked issue is misleading --coder config-ssh continues to support thecoder. prefix. The reason the command
ssh coder.workspace.agent fails is becausecoder ssh workspace.agent wasn't supported. This PR fixes that.

We know we used to supportworkspace.agent, as this is what we (used to) recommend in the Web UI:
image

This PR also adds support forcoder ssh agent.workspace.owner, such that after runningcoder config-ssh, a command like

ssh agent.workspace.owner.coder

works, even without Coder Connect running. This is done for parity with an existing workflow that usesssh workspace.coder, which either uses Coder Connect if available, or the CLI.

@ethanndicksonGraphite App
Copy link
MemberAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the handling of the ssh command input format by adding support for the "workspace.agent" and "agent.workspace.owner" formats, ensuring parity with the existing Coder Connect workflow.

  • Updated SSH tests (cli/ssh_test.go) with new cases such as "myworkspace.dev" and "dev.myworkspace.myuser"
  • Modified the workspace normalization logic in cli/ssh.go to correctly transform the new input formats

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

FileDescription
cli/ssh_test.goAdded new test cases for handling "workspace.agent" and "agent.workspace.owner" formats
cli/ssh.goUpdated input normalization to support the new formats through specific conditional logic
Comments suppressed due to low confidence (1)

cli/ssh_test.go:117

  • Include an assertion comment or additional explicit test expectations for the normalized output of this new input format to verify that the transformation to 'owner/workspace.agent' is correct.
"dev.myworkspace.myuser",

@ethanndicksonethanndickson marked this pull request as ready for reviewMay 29, 2025 01:47
@ethanndicksonethanndicksonforce-pushed theethan/extra-ssh-input-cases branch from99db25d todf1ec50CompareMay 29, 2025 01:49
@matifali
Copy link
Member

Would this also supportssh workspace.agent.coder format?
For workspaces having multiple agents?

@ethanndickson
Copy link
MemberAuthor

ethanndickson commentedMay 29, 2025
edited
Loading

ssh workspace.agent.coder viaconfig-ssh becomescoder ssh workspace.agent, and supporting that is the very purpose of this PR

With this PR:

$ ssh pog2.dev.coder👋 Your workspace is outdated! Update it here: https://dev.coder.com/@ethan/pog2
matifali reacted with thumbs up emoji

@ethanndicksonethanndickson merged commitda02375 intomainMay 29, 2025
30 checks passed
@ethanndicksonethanndickson deleted the ethan/extra-ssh-input-cases branchMay 29, 2025 07:26
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMay 29, 2025
@matifali
Copy link
Member

/cherry-pick release/2.22

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

Copilot code reviewCopilotCopilot left review comments

@deansheatherdeansheatherdeansheather approved these changes

Assignees

@ethanndicksonethanndickson

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

bug: SSH Prefix change is not backwards compatible

4 participants

@ethanndickson@matifali@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp