fix!: stop workspace before update (#18425)

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

NOTE: calling this out as a breaking change so that it is highly visible
in the changelog.

* CLI: Modifies `coder update` to stop the workspace if already running.
* UI: Modifies "update" button to always stop the workspace if already
running.
This commit is contained in:
Cian Johnston
2025-06-23 09:12:37 +01:00
committed by GitHub
parent 725bc3792e
commit 49fcffc266
24 changed files with 429 additions and 235 deletions
+44 -44
View File
@@ -22,50 +22,50 @@ Coder — A tool for provisioning self-hosted development environments with Terr
## Subcommands
| Name | Purpose |
|----------------------------------------------------|-------------------------------------------------------------------------------------------------------|
| [<code>completion</code>](./completion.md) | Install or update shell completion scripts for the detected or chosen shell. |
| [<code>dotfiles</code>](./dotfiles.md) | Personalize your workspace by applying a canonical dotfiles repository |
| [<code>external-auth</code>](./external-auth.md) | Manage external authentication |
| [<code>login</code>](./login.md) | Authenticate with Coder deployment |
| [<code>logout</code>](./logout.md) | Unauthenticate your local session |
| [<code>netcheck</code>](./netcheck.md) | Print network debug information for DERP and STUN |
| [<code>notifications</code>](./notifications.md) | Manage Coder notifications |
| [<code>organizations</code>](./organizations.md) | Organization related commands |
| [<code>port-forward</code>](./port-forward.md) | Forward ports from a workspace to the local machine. For reverse port forwarding, use "coder ssh -R". |
| [<code>publickey</code>](./publickey.md) | Output your Coder public key used for Git operations |
| [<code>reset-password</code>](./reset-password.md) | Directly connect to the database to reset a user's password |
| [<code>state</code>](./state.md) | Manually manage Terraform state to fix broken workspaces |
| [<code>templates</code>](./templates.md) | Manage templates |
| [<code>tokens</code>](./tokens.md) | Manage personal access tokens |
| [<code>users</code>](./users.md) | Manage users |
| [<code>version</code>](./version.md) | Show coder version |
| [<code>autoupdate</code>](./autoupdate.md) | Toggle auto-update policy for a workspace |
| [<code>config-ssh</code>](./config-ssh.md) | Add an SSH Host entry for your workspaces "ssh workspace.coder" |
| [<code>create</code>](./create.md) | Create a workspace |
| [<code>delete</code>](./delete.md) | Delete a workspace |
| [<code>favorite</code>](./favorite.md) | Add a workspace to your favorites |
| [<code>list</code>](./list.md) | List workspaces |
| [<code>open</code>](./open.md) | Open a workspace |
| [<code>ping</code>](./ping.md) | Ping a workspace |
| [<code>rename</code>](./rename.md) | Rename a workspace |
| [<code>restart</code>](./restart.md) | Restart a workspace |
| [<code>schedule</code>](./schedule.md) | Schedule automated start and stop times for workspaces |
| [<code>show</code>](./show.md) | Display details of a workspace's resources and agents |
| [<code>speedtest</code>](./speedtest.md) | Run upload and download tests from your machine to a workspace |
| [<code>ssh</code>](./ssh.md) | Start a shell into a workspace or run a command |
| [<code>start</code>](./start.md) | Start a workspace |
| [<code>stat</code>](./stat.md) | Show resource usage for the current workspace. |
| [<code>stop</code>](./stop.md) | Stop a workspace |
| [<code>unfavorite</code>](./unfavorite.md) | Remove a workspace from your favorites |
| [<code>update</code>](./update.md) | Will update and start a given workspace if it is out of date |
| [<code>whoami</code>](./whoami.md) | Fetch authenticated user info for Coder deployment |
| [<code>support</code>](./support.md) | Commands for troubleshooting issues with a Coder deployment. |
| [<code>server</code>](./server.md) | Start a Coder server |
| [<code>features</code>](./features.md) | List Enterprise features |
| [<code>licenses</code>](./licenses.md) | Add, delete, and list licenses |
| [<code>groups</code>](./groups.md) | Manage groups |
| [<code>provisioner</code>](./provisioner.md) | View and manage provisioner daemons and jobs |
| Name | Purpose |
|----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|
| [<code>completion</code>](./completion.md) | Install or update shell completion scripts for the detected or chosen shell. |
| [<code>dotfiles</code>](./dotfiles.md) | Personalize your workspace by applying a canonical dotfiles repository |
| [<code>external-auth</code>](./external-auth.md) | Manage external authentication |
| [<code>login</code>](./login.md) | Authenticate with Coder deployment |
| [<code>logout</code>](./logout.md) | Unauthenticate your local session |
| [<code>netcheck</code>](./netcheck.md) | Print network debug information for DERP and STUN |
| [<code>notifications</code>](./notifications.md) | Manage Coder notifications |
| [<code>organizations</code>](./organizations.md) | Organization related commands |
| [<code>port-forward</code>](./port-forward.md) | Forward ports from a workspace to the local machine. For reverse port forwarding, use "coder ssh -R". |
| [<code>publickey</code>](./publickey.md) | Output your Coder public key used for Git operations |
| [<code>reset-password</code>](./reset-password.md) | Directly connect to the database to reset a user's password |
| [<code>state</code>](./state.md) | Manually manage Terraform state to fix broken workspaces |
| [<code>templates</code>](./templates.md) | Manage templates |
| [<code>tokens</code>](./tokens.md) | Manage personal access tokens |
| [<code>users</code>](./users.md) | Manage users |
| [<code>version</code>](./version.md) | Show coder version |
| [<code>autoupdate</code>](./autoupdate.md) | Toggle auto-update policy for a workspace |
| [<code>config-ssh</code>](./config-ssh.md) | Add an SSH Host entry for your workspaces "ssh workspace.coder" |
| [<code>create</code>](./create.md) | Create a workspace |
| [<code>delete</code>](./delete.md) | Delete a workspace |
| [<code>favorite</code>](./favorite.md) | Add a workspace to your favorites |
| [<code>list</code>](./list.md) | List workspaces |
| [<code>open</code>](./open.md) | Open a workspace |
| [<code>ping</code>](./ping.md) | Ping a workspace |
| [<code>rename</code>](./rename.md) | Rename a workspace |
| [<code>restart</code>](./restart.md) | Restart a workspace |
| [<code>schedule</code>](./schedule.md) | Schedule automated start and stop times for workspaces |
| [<code>show</code>](./show.md) | Display details of a workspace's resources and agents |
| [<code>speedtest</code>](./speedtest.md) | Run upload and download tests from your machine to a workspace |
| [<code>ssh</code>](./ssh.md) | Start a shell into a workspace or run a command |
| [<code>start</code>](./start.md) | Start a workspace |
| [<code>stat</code>](./stat.md) | Show resource usage for the current workspace. |
| [<code>stop</code>](./stop.md) | Stop a workspace |
| [<code>unfavorite</code>](./unfavorite.md) | Remove a workspace from your favorites |
| [<code>update</code>](./update.md) | Will update and start a given workspace if it is out of date. If the workspace is already running, it will be stopped first. |
| [<code>whoami</code>](./whoami.md) | Fetch authenticated user info for Coder deployment |
| [<code>support</code>](./support.md) | Commands for troubleshooting issues with a Coder deployment. |
| [<code>server</code>](./server.md) | Start a Coder server |
| [<code>features</code>](./features.md) | List Enterprise features |
| [<code>licenses</code>](./licenses.md) | Add, delete, and list licenses |
| [<code>groups</code>](./groups.md) | Manage groups |
| [<code>provisioner</code>](./provisioner.md) | View and manage provisioner daemons and jobs |
## Options
+1 -1
View File
@@ -1,7 +1,7 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# update
Will update and start a given workspace if it is out of date
Will update and start a given workspace if it is out of date. If the workspace is already running, it will be stopped first.
## Usage