- Notifications
You must be signed in to change notification settings - Fork1.1k
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ethanndickson commentedMay 29, 2025
There was a problem hiding this 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.
| File | Description |
|---|---|
| cli/ssh_test.go | Added new test cases for handling "workspace.agent" and "agent.workspace.owner" formats |
| cli/ssh.go | Updated 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",Uh oh!
There was an error while loading.Please reload this page.
99db25d todf1ec50Comparematifali commentedMay 29, 2025
Would this also support |
ethanndickson commentedMay 29, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
With this PR: |
da02375 intomainUh oh!
There was an error while loading.Please reload this page.
matifali commentedMay 29, 2025
/cherry-pick release/2.22 |

Uh oh!
There was an error while loading.Please reload this page.
Closes#18088.
The linked issue is misleading --
coder config-sshcontinues to support thecoder.prefix. The reason the commandssh coder.workspace.agentfails is becausecoder ssh workspace.agentwasn't supported. This PR fixes that.We know we used to support

workspace.agent, as this is what we (used to) recommend in the Web UI:This PR also adds support for
coder ssh agent.workspace.owner, such that after runningcoder config-ssh, a command likeworks, even without Coder Connect running. This is done for parity with an existing workflow that uses
ssh workspace.coder, which either uses Coder Connect if available, or the CLI.