Skip to content
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

fix: handle VS Code state when workspace restart #331

Merged
merged 8 commits into from
Mar 4, 2024

Conversation

vitaliy-guliy
Copy link
Contributor

@vitaliy-guliy vitaliy-guliy commented Feb 19, 2024

What does this PR do?

Improves the behavior when the user asked to restart the workspace with applying local devfile.
Now, after sending a request to stop the workspace, an infinity modal popup is displayed.
The popup is closed when clicking Reload Now button or when VS Code lost the connection with backend (we suggested here that the workspace is stopped).
Once the popup is closed, the page will be reloaded.

Screenshot from 2024-02-21 09-25-30

What issues does this PR fix?

eclipse-che/che#22769

How to test this PR?

How to test this PR?

It is better to test it on workspaces.openshift.com as reported in the issue.
To create a workspace use https://github.com/vitaliy-guliy/vscode-test-extension?che-editor=https://gist.githubusercontent.com/vitaliy-guliy/8fbbfafa1de2448acffa01e1386f1a3f/raw/92212202af6d65625a4f13ab40b4e486fd3803d0/editor.yaml

Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Copy link

github-actions bot commented Feb 19, 2024

Click here to review and test in web IDE: Contribute

Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-331-dev-amd64

Copy link

Pull Request Che-Code image published:
👉 quay.io/che-incubator-pull-requests/che-code:pr-331-amd64

Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-331-dev-amd64

Copy link

Pull Request Che-Code image published:
👉 quay.io/che-incubator-pull-requests/che-code:pr-331-amd64

Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-331-dev-amd64

@vitaliy-guliy vitaliy-guliy changed the title fix: add some delay when workspace restart fix: handle VS Code state when workspace restart Feb 21, 2024
Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-331-dev-amd64

1 similar comment
Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-331-dev-amd64

Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Copy link

Pull Request Che-Code image published:
👉 quay.io/che-incubator-pull-requests/che-code:pr-331-amd64

1 similar comment
Copy link

Pull Request Che-Code image published:
👉 quay.io/che-incubator-pull-requests/che-code:pr-331-amd64

@vitaliy-guliy vitaliy-guliy marked this pull request as ready for review February 21, 2024 15:42
Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-331-dev-amd64

Copy link

Pull Request Che-Code image published:
👉 quay.io/che-incubator-pull-requests/che-code:pr-331-amd64

@vitaliy-guliy vitaliy-guliy marked this pull request as draft February 26, 2024 17:05
Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-331-dev-amd64

Copy link

Pull Request Che-Code image published:
👉 quay.io/che-incubator-pull-requests/che-code:pr-331-amd64

Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-331-dev-amd64

Copy link

Pull Request Che-Code image published:
👉 quay.io/che-incubator-pull-requests/che-code:pr-331-amd64

@vitaliy-guliy vitaliy-guliy marked this pull request as ready for review February 28, 2024 09:25
Copy link
Member

@azatsarynnyy azatsarynnyy left a comment

Choose a reason for hiding this comment

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

I've just tested it on Dev Sandbox.
Everything works perfectly - the workspace is reloaded as expected, with no errors 👍
Thanks @vitaliy-guliy for fixing the problem!

@vitaliy-guliy
Copy link
Contributor Author

I've just tested it on Dev Sandbox. Everything works perfectly - the workspace is reloaded as expected, with no errors 👍 Thanks @vitaliy-guliy for fixing the problem!

You are lucky you did not face any issues when reloading the workspace.
But this PR improves the workspace restart anyway, so will merge it.

@vitaliy-guliy vitaliy-guliy merged commit 9049e48 into main Mar 4, 2024
7 checks passed
@vitaliy-guliy vitaliy-guliy deleted the restart-from-local-devfile branch March 4, 2024 12:02
@vitaliy-guliy vitaliy-guliy added the made-with-che Changes made with Che-Code label Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
made-with-che Changes made with Che-Code
Projects
None yet
2 participants