-
Notifications
You must be signed in to change notification settings - Fork 979
feat: cli: consolidate schedule-related commands #2402
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
70cec9d
feat: cli: consolidate schedule-related commands
johnstcn b2e8f15
fixup! feat: cli: consolidate schedule-related commands
johnstcn 8fa27aa
Makefile: test-postgres: increase timeout and parallelism
johnstcn ae6c047
make lint
johnstcn f817751
more tests, some cli tweaks
johnstcn f6f8de0
update schedule override output to match other commands
johnstcn dad6695
show time until deadline
johnstcn bf1bafd
bump test timeout
johnstcn 3441dab
Merge remote-tracking branch 'origin/main' into cj/2258/cli-schedule-…
johnstcn 81b2656
address PR comments
johnstcn dc16686
address PR comments
johnstcn aced9da
Merge remote-tracking branch 'origin/main' into cj/2258/cli-schedule-…
johnstcn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
more tests, some cli tweaks
- Loading branch information
commit f817751f0cfc9fc6f00e08766f6fa1109f98e916
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ func list() *cobra.Command { | |
} | ||
|
||
tableWriter := cliui.Table() | ||
header := table.Row{"workspace", "template", "status", "last built", "outdated", "autostart", "ttl"} | ||
header := table.Row{"workspace", "template", "status", "last built", "outdated", "starts at", "stops after"} | ||
tableWriter.AppendHeader(header) | ||
tableWriter.SortBy([]table.SortBy{{ | ||
Name: "workspace", | ||
|
@@ -89,7 +89,7 @@ func list() *cobra.Command { | |
autostartDisplay := "-" | ||
if !ptr.NilOrEmpty(workspace.AutostartSchedule) { | ||
if sched, err := schedule.Weekly(*workspace.AutostartSchedule); err == nil { | ||
autostartDisplay = sched.Cron() | ||
autostartDisplay = fmt.Sprintf("%s %s (%s)", sched.Time(), sched.DaysOfWeek(), sched.Location()) | ||
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. Consistent schedule format |
||
} | ||
} | ||
|
||
|
@@ -98,7 +98,7 @@ func list() *cobra.Command { | |
dur := time.Duration(*workspace.TTLMillis) * time.Millisecond | ||
autostopDisplay = durationDisplay(dur) | ||
if has, ext := hasExtension(workspace); has { | ||
autostopDisplay += fmt.Sprintf(" (+%s)", durationDisplay(ext)) | ||
autostopDisplay += fmt.Sprintf(" (%s%s)", sign(ext), durationDisplay(ext)) | ||
} | ||
} | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Clearer language