Skip to content

fix!: stop workspace before update #18425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Jun 18, 2025

Fixes #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.

@johnstcn johnstcn changed the title Cj/prebuild template upgrade fix: stop workspace before update Jun 18, 2025
@johnstcn johnstcn changed the title fix: stop workspace before update fix!: stop workspace before update Jun 18, 2025
@johnstcn johnstcn force-pushed the cj/prebuild-template-upgrade branch from 42420b1 to fa2d4eb Compare June 18, 2025 15:17
@johnstcn johnstcn added the release/breaking This label is applied to PRs to detect breaking changes as part of the release process label Jun 18, 2025
@@ -21,19 +20,39 @@ export interface ActionButtonProps {
tooltipText?: string;
}

export const UpdateButton: FC<ActionButtonProps> = ({
export const UpdateAndStartButton: FC<ActionButtonProps> = ({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably keep this as one component that takes a prop like isRunning or something to change the text, since that seems to be the main difference

loading,
}) => {
return (
<Tooltip title="Stop workspace, if running, and restart it with the latest template version.">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Tooltip title="Stop workspace, if running, and restart it with the latest template version.">
<Tooltip title="Stop workspace and restart it with the latest template version.">

more confident wording. unless I'm misunderstanding, that's the point of this change.

export const UpdateAndStartButton: FC<ActionButtonProps> = ({
handleAction,
}) => {
export const UpdateAndStartButtonRequireActiveVersion: FC<
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similarly, this could also just be an activeVersionRequired prop, rather than exponentially increasing the number of Update(.+)Button(.+?) components we have

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/breaking This label is applied to PRs to detect breaking changes as part of the release process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: template upgrade fails on claimed prebuilt workspace
2 participants