mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(cli): prevent coder schedule command on prebuilt workspaces (#19259)
## Description This PR adds CLI-side validation to prevent the use of the `coder schedule` command (including both `start` and `stop` subcommands) on prebuilt workspaces. Prebuilt workspaces are scheduled independently by the reconciliation loop, based on template and preset-level configuration. They do not participate in the regular user workspace lifecycle, and cannot be configured via the `coder schedule` CLI command. This change ensures that attempting to configure scheduling on a prebuilt workspace results in a clear CLI error. ## Changes - `coder schedule start` — now returns an error if the target workspace is a prebuild - `coder schedule stop` — now returns an error if the target workspace is a prebuild Related with: * Issue: https://github.com/coder/coder/issues/18898 * **Depends on PR**: https://github.com/coder/coder/pull/19252
This commit is contained in:
+2
-1
@@ -7,7 +7,8 @@ USAGE:
|
||||
|
||||
Aliases: override-stop
|
||||
|
||||
* The new stop time is calculated from *now*.
|
||||
Extends the workspace deadline.
|
||||
* The new stop time is calculated from *now*.
|
||||
* The new stop time must be at least 30 minutes in the future.
|
||||
* The workspace template may restrict the maximum workspace runtime.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user