Skip to content

fix: Handle workspace restart when DWO restarts the pod before the restart command reaches the browser - #795

Open
RomanNikitenko wants to merge 1 commit into
che-incubator:7.121.xfrom
RomanNikitenko:7-121-fix-restart-from-local-devfile
Open

fix: Handle workspace restart when DWO restarts the pod before the restart command reaches the browser#795
RomanNikitenko wants to merge 1 commit into
che-incubator:7.121.xfrom
RomanNikitenko:7-121-fix-restart-from-local-devfile

Conversation

@RomanNikitenko

@RomanNikitenko RomanNikitenko commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Backport of #794

What issues does this PR fix?

https://redhat.atlassian.net/browse/CRW-9559

How to test this PR?

1. Restart Workspace from Local Devfile for Empty Workspace use case

  1. Go to the Dashboard
  2. Set the following image in the Editor Image field
quay.io/che-incubator-pull-requests/che-code:pr-795-amd64
  1. Click Empty Workspace
  2. Create a terminal =>
git clone https://github.com/crw-qe/ubi9-based-sample-public.git && \
cd ubi9-based-sample-public && \
git checkout ubi9-init
  1. F1 => Restart Workspace from Local Devfile

Expected result:

  • the workspace should be restarted successfully
  • Cannot reconnect. Please reload the window. dialog is not displayed.

2. Restart Workspace from Local Devfile for NOT Empty Workspace use case

  1. Go to the Dashboard
  2. Set the following image in the Editor Image field
quay.io/che-incubator-pull-requests/che-code:pr-795-amd64
  1. Set https://github.com/RomanNikitenko/web-nodejs-sample in the Git repo URL field
  2. Click Create & Open
  3. Open devfile => provide some changes
  4. F1 => Restart Workspace from Local Devfile

Expected result:

  • the workspace should be restarted successfully
  • Cannot reconnect. Please reload the window. dialog is not displayed.
  • devfile changes should be applied

3. Restart Workspace command use case

Restart Workspace command is also affected by the current PR changes

  1. Go to the Dashboard
  2. Set the following image in the Editor Image field
quay.io/che-incubator-pull-requests/che-code:pr-795-amd64
  1. Create any workspace
  2. F1 => Restart Workspace when the workspace is ready to use

Expected result:

  • the workspace should be restarted successfully
  • Cannot reconnect. Please reload the window. dialog is not displayed.

4. Stop Workspace command use case

Stop Workspace command is also affected by the current PR changes

  1. Go to the Dashboard
  2. Set the following image in the Editor Image field
quay.io/che-incubator-pull-requests/che-code:pr-795-amd64
  1. Create any workspace
  2. F1 => Stop Workspace when the workspace is ready to use

Expected result:

  • the workspace should be stopped successfully
  • user should be redirected to the dashboard

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

…start command reaches the browser

When Restart from Local Devfile updates spec.template with significant
changes (e.g. adding a project), the DevWorkspace Operator may restart
the pod before the browser-side restartWorkspace command is invoked,
causing the disconnection handler to show an unexpected workspace not
running dialog instead of redirecting to the dashboard.

Signal the browser before the K8s patch so the disconnection handler
can redirect to the dashboard if the extension host dies.

Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Click here to review and test in web IDE: Contribute

@github-actions

Copy link
Copy Markdown
Contributor

@RomanNikitenko
RomanNikitenko marked this pull request as ready for review August 21, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant