chore: rollback PR #18081 (#18104)

Rollback https://github.com/coder/coder/pull/18081
This commit is contained in:
Bruno Quaresma
2025-05-29 13:12:13 -03:00
committed by GitHub
parent 345001ffd1
commit d779126ee3
56 changed files with 146 additions and 164 deletions

View File

@ -305,7 +305,7 @@ func (r *RootCmd) ssh() *serpent.Command {
return xerrors.Errorf("get agent connection info: %w", err)
}
coderConnectHost := fmt.Sprintf("%s.%s.%s.%s",
workspaceAgent.Name, workspace.Name, workspace.OwnerUsername, connInfo.HostnameSuffix)
workspaceAgent.Name, workspace.Name, workspace.OwnerName, connInfo.HostnameSuffix)
exists, _ := workspacesdk.ExistsViaCoderConnect(ctx, coderConnectHost)
if exists {
defer cancel()
@ -1022,7 +1022,7 @@ func verifyWorkspaceOutdated(client *codersdk.Client, workspace codersdk.Workspa
// Build the user workspace link which navigates to the Coder web UI.
func buildWorkspaceLink(serverURL *url.URL, workspace codersdk.Workspace) *url.URL {
return serverURL.ResolveReference(&url.URL{Path: fmt.Sprintf("@%s/%s", workspace.OwnerUsername, workspace.Name)})
return serverURL.ResolveReference(&url.URL{Path: fmt.Sprintf("@%s/%s", workspace.OwnerName, workspace.Name)})
}
// runLocal runs a command on the local machine.