mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user