- Notifications
You must be signed in to change notification settings - Fork928
fix: permit SSH by default when startup script fails#6798
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.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -82,10 +82,13 @@ func (r *RootCmd) ssh() *clibase.Cmd { | ||
if xerrors.Is(err, context.Canceled) { | ||
return cliui.Canceled | ||
} | ||
if!xerrors.Is(err, cliui.AgentStartError) { | ||
return xerrors.Errorf("await agent: %w", err) | ||
} | ||
// We don't want to fail on a startup script error because it's | ||
// natural that the user will want to fix the script and try again. | ||
// We don't print the error because cliui.Agent does that for us. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. @ammario with this change, there'll be no indication for people SSH:ing in that there's a problem or that the workspace ran into an error ( The logs would only be visible by doing I guess one option would be to print this on the agent side, as part of MOTD. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. MOTD makes sense to me | ||
} | ||
conn, err := client.DialWorkspaceAgent(ctx, workspaceAgent.ID, &codersdk.DialWorkspaceAgentOptions{}) | ||