mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: handle workspace.agent and agent.workspace.owner in coder ssh (#18093)
Closes #18088. The linked issue is misleading -- `coder config-ssh` continues to support the `coder.` prefix. The reason the command `ssh coder.workspace.agent` fails is because `coder ssh workspace.agent` wasn't supported. This PR fixes that. We know we used to support `workspace.agent`, as this is what we recommend in the Web UI:  This PR also adds support for `coder ssh agent.workspace.owner`, such that after running `coder 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 uses `ssh workspace.coder`, which either uses Coder Connect if available, or the CLI.
This commit is contained in:
@@ -107,12 +107,14 @@ func TestSSH(t *testing.T) {
|
||||
|
||||
cases := []string{
|
||||
"myworkspace",
|
||||
"myworkspace.dev",
|
||||
"myuser/myworkspace",
|
||||
"myuser--myworkspace",
|
||||
"myuser/myworkspace--dev",
|
||||
"myuser/myworkspace.dev",
|
||||
"myuser--myworkspace--dev",
|
||||
"myuser--myworkspace.dev",
|
||||
"dev.myworkspace.myuser",
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
|
||||
Reference in New Issue
Block a user