fix: allow users to extend their running workspace's deadline (#15895)

Fixes https://github.com/coder/coder/issues/15515

This change effectively reverts the changes introduced by
https://github.com/coder/coder/pull/13182 (for
https://github.com/coder/coder/issues/13078).

We also rename the `override-stop` command name to `extend` to match the
API endpoint's name (keeping an alias to allow `override-stop` to be used).
This commit is contained in:
Danielle Maywood
2024-12-18 10:58:33 +00:00
committed by GitHub
parent 4c5b737368
commit 91875c2b47
11 changed files with 82 additions and 123 deletions
+7 -7
View File
@@ -7,14 +7,14 @@ Schedule automated start and stop times for workspaces
## Usage
```console
coder schedule { show | start | stop | override } <workspace>
coder schedule { show | start | stop | extend } <workspace>
```
## Subcommands
| Name | Purpose |
| --------------------------------------------------------- | ----------------------------------------------------------------- |
| [<code>show</code>](./schedule_show.md) | Show workspace schedules |
| [<code>start</code>](./schedule_start.md) | Edit workspace start schedule |
| [<code>stop</code>](./schedule_stop.md) | Edit workspace stop schedule |
| [<code>override-stop</code>](./schedule_override-stop.md) | Override the stop time of a currently running workspace instance. |
| Name | Purpose |
| ------------------------------------------- | --------------------------------------------------------------- |
| [<code>show</code>](./schedule_show.md) | Show workspace schedules |
| [<code>start</code>](./schedule_start.md) | Edit workspace start schedule |
| [<code>stop</code>](./schedule_stop.md) | Edit workspace stop schedule |
| [<code>extend</code>](./schedule_extend.md) | Extend the stop time of a currently running workspace instance. |
@@ -1,13 +1,17 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# schedule override-stop
# schedule extend
Override the stop time of a currently running workspace instance.
Extend the stop time of a currently running workspace instance.
Aliases:
- override-stop
## Usage
```console
coder schedule override-stop <workspace-name> <duration from now>
coder schedule extend <workspace-name> <duration from now>
```
## Description
@@ -18,5 +22,5 @@ coder schedule override-stop <workspace-name> <duration from now>
* The new stop time must be at least 30 minutes in the future.
* The workspace template may restrict the maximum workspace runtime.
$ coder schedule override-stop my-workspace 90m
$ coder schedule extend my-workspace 90m
```