Skip to content

✨ standardize gp CLI timeout cmds output #16091

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/gitpod-cli/cmd/timeout-extend.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var extendTimeoutCmd = &cobra.Command{
}
fail(err.Error())
}
fmt.Println("Workspace timeout has been extended to three hours.")
fmt.Println("Workspace timeout extended to 180 minutes.")
},
}

Expand Down
6 changes: 3 additions & 3 deletions components/gitpod-cli/cmd/timeout-set.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ var setTimeoutCmd = &cobra.Command{
Short: "Set timeout of current workspace",
Long: `Set timeout of current workspace.

Duration must be in the format of <n>m (minutes), <n>h (hours), or <n>d (days).
For example, 30m, 1h, 2d, etc.`,
Example: `gitpod timeout set 1h`,
Duration must be in the format of <n>m (minutes) or <n>h (hours).
For example, 30m, 1h`,
Example: `gitpod timeout set 30m`,
Run: func(cmd *cobra.Command, args []string) {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ class ExtendWorkspaceTimeoutAction : AnAction() {
thisLogger().error("gitpod: failed to extend workspace timeout", e)
Copy link
Member

Choose a reason for hiding this comment

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

Thought: Interesting, I didn't realise this logic was copied into our JetBrains codebase, I assumed it was running the gp command under the hood.

} else {
if (result.resetTimeoutOnWorkspaces.isNotEmpty()) {
message = "Workspace timeout has been extended to three hours. This reset the workspace timeout for other workspaces."
message = "Workspace timeout extended to 180 minutes. This reset the workspace timeout for other workspaces."
notificationType = NotificationType.WARNING
} else {
message = "Workspace timeout has been extended to three hours."
message = "Workspace timeout extended to 180 minutes."
notificationType = NotificationType.INFORMATION
}
}
Expand Down