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
+13
View File
@@ -1018,9 +1018,22 @@ export const updateWorkspace = async (
await fillParameters(page, richParameters, buildParameters);
await page.getByRole("button", { name: /update parameters/i }).click();
// Wait for the update button to detach.
await page.waitForSelector(
"button[data-testid='workspace-update-button']:enabled",
{ state: "detached" },
);
// Wait for the workspace to be running again.
await page.waitForSelector("text=Workspace status: Running", {
state: "visible",
});
// Wait for the stop button to be enabled again
await page.waitForSelector(
"button[data-testid='workspace-stop-button']:enabled",
{
state: "visible",
},
);
};
export const updateWorkspaceParameters = async (