The "Update workspace" command provided by the Coder VS Code extension does not currently stop the user's running workspace before updating and restarting it; instead a "start" workspace build/transition is executed on the running workspace:
Despite that the confirmation prompt communicates that a stop/restart of the workspace will occur:
Update ${createWorkspaceIdentifier(this.workspace)} to the latest version?
Updating will restart your workspace which stops any running processes and may result in the loss of unsaved work.
|
detail: `Update ${createWorkspaceIdentifier(this.workspace)} to the latest version?\n\nUpdating will restart your workspace which stops any running processes and may result in the loss of unsaved work.`, |
I understand that ideally Coder workspace templates would be implemented to be robust to multiple "start" workspace builds/transitions, but at my company we use KubeVirt VMs for our Coder workspaces which do not easily support the resulting re-apply of our workspace Terraform template with another Coder workspace "start" build/transition - instead, only a "stop" followed by a "start" is expected to work consistently as it ensures the underlying VM is actually updated with the latest template configuration.
The impact to our devs is that clicking the "Update workspace" command in the Coder VS Code extension can sometimes (depending on the changes in the newer template version) put their workspace in an unhealthy state which confuses them and requires the additional time and manual steps of stopping and then restarting the workspace to recover.
I understand there's been an effort to make this "Update and restart" behavior more consistent throughout the Coder UX, for example coder/coder#22020 was recently addressed to fix that in the web UI (see my similar comment on that issue here: coder/coder#22020 (comment)).
Along those lines, can the "Update workspace" command in the Coder VS Code extension be changed to first stop the user's running workspace before updating and [re]starting it?
The "Update workspace" command provided by the Coder VS Code extension does not currently stop the user's running workspace before updating and restarting it; instead a "start" workspace build/transition is executed on the running workspace:
Despite that the confirmation prompt communicates that a stop/restart of the workspace will occur:
vscode-coder/src/commands.ts
Line 769 in c2aa5ca
I understand that ideally Coder workspace templates would be implemented to be robust to multiple "start" workspace builds/transitions, but at my company we use KubeVirt VMs for our Coder workspaces which do not easily support the resulting re-apply of our workspace Terraform template with another Coder workspace "start" build/transition - instead, only a "stop" followed by a "start" is expected to work consistently as it ensures the underlying VM is actually updated with the latest template configuration.
The impact to our devs is that clicking the "Update workspace" command in the Coder VS Code extension can sometimes (depending on the changes in the newer template version) put their workspace in an unhealthy state which confuses them and requires the additional time and manual steps of stopping and then restarting the workspace to recover.
I understand there's been an effort to make this "Update and restart" behavior more consistent throughout the Coder UX, for example coder/coder#22020 was recently addressed to fix that in the web UI (see my similar comment on that issue here: coder/coder#22020 (comment)).
Along those lines, can the "Update workspace" command in the Coder VS Code extension be changed to first stop the user's running workspace before updating and [re]starting it?