-
Notifications
You must be signed in to change notification settings - Fork 52
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
feat: implement more specific error pages for 'workspace stopped' err… #595
Conversation
packages/dashboard-frontend/src/services/bootstrap/__tests__/workspaceStoppedDetector.spec.ts
Show resolved
Hide resolved
f012219
to
ebeb377
Compare
ebeb377
to
ac60210
Compare
…or page Signed-off-by: David Kwon <[email protected]>
ac60210
to
ca94ba2
Compare
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-595 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested locally on minikube, and everything works as expected.
Signed-off-by: David Kwon <[email protected]>
Signed-off-by: David Kwon <[email protected]>
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-595 |
@dkwon17: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: akurinnoy, dkwon17, ibuziuk, olexii4 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…or page
Signed-off-by: David Kwon [email protected]
What does this PR do?
Currently there is a generic error page that is displayed when trying to access a workspace url (a devworkspace's
status.mainUrl
) when the workspace is not running:However, there can be multiple reasons why a workspace is not running. Some examples are:
status.phase == Failed
)This PR introduces a new class WorkspaceStoppedDetector to help detect the different cases.
Ad a result, different error page messages in each of these four scenarios are available:
Workspace inactivity
Workspace run timeout
Workspace error
Workspace was not started
What issues does this PR fix or reference?
Fixes eclipse-che/che#21516
Is it tested? How?
Testing the 'Workspace inactivity' error page
Set the workspace inactivity timeout to a smaller value by setting
checluster.spec.devEnvironments.secondsOfInactivityBeforeIdling
to, for example,120
.Start a workspace. Once the editor opens, let it timeout by not interacting with it for about 120 seconds.
Once the workspace times out, refresh the page
Testing the 'Workspace run timeout' error page
Set the workspace run timeout to a value smaller than the inactivity timeout by setting
checluster.spec.devEnvironments.secondsOfRunBeforeIdling
to, for example,80
.Start a workspace. After the workspace starts, the workspace should terminate in about 80 seconds.
Once the workspace times out, refresh the editor page
Testing the 'Workspace error' error page
To prevent other timeouts from shutting down the workspace, disable the timeouts by setting both
secondsOfInactivityBeforeIdling
andsecondsOfRunBeforeIdling
to-1
in thechecluster
CR.Start a workspace with this github repository: https://github.com/dkwon17/failing-workspace/tree/fail-delayed
The editor should open, however after roughly 1 minute and 30 seconds, the workspace should terminate due to a failing container.
Refresh the editor page
Testing the 'Workspace was not started' error page
Start a workspace.
Once the workspace has started and the editor has loaded, stop the workspace.
Refresh the editor page
Release Notes
The warning page that appears when accessing the workspace url for a stopped workspace provides a more specific message depending on the reason why the workspace has stopped.
The cases are:
Docs PR