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

Determine why workspace stopped and provide appropriate warning/info page on dashboard if needed #21516

Closed
dkwon17 opened this issue Jun 28, 2022 · 1 comment · Fixed by eclipse-che/che-dashboard#595
Labels
area/dashboard kind/enhancement A feature request - must adhere to the feature request template. severity/P2 Has a minor but important impact to the usage or development of the system. sprint/next

Comments

@dkwon17
Copy link
Contributor

dkwon17 commented Jun 28, 2022

Is your enhancement related to a problem? Please describe

Continuation of #20599

Currently, when a workspace is not running, accessing the workspace url (e.g. the devworkspace CR's status.mainUrl) will redirect the user to the dashboard with a warning page. The user is redirected to the dashboard in this case because eclipse-che/che-operator#1392 routes the workspace url requests to the dashboard if the workspace itself is not running.

Warning page:
image

Although initially meant to be displayed only for workspace timeout cases, this warning page acts as a page that is shown when trying to go to workspace url for a workspace that has not started.

In other words, a user can see this page if they don't start the workspace and then by accessing the workspace url. This case would not typically happen since the dashboard does not direct the user to the workspace url if the workspace is not running.

Describe the solution you'd like

Since there can be many reasons a workspace is not running, it would be great if there were different warning/info pages that the dashboard provides in various scenarios:

  • workspace has stopped due to a timeout:

    • display an info message (instead of a warning message) letting the user know that the workspace has timed out
  • workspace was not started in the first place:

    • display an info message letting the user know that the workspace is not running.
  • workspace was running, and then was stopped unexpectedly (need to investigate potential reasons why this might happen):

    • error page

These warning/info/error pages would appear only when being redirected to the dashboard after accessing the workspace's url.

Describe alternatives you've considered

No response

Additional context

No response

@dkwon17 dkwon17 added the kind/enhancement A feature request - must adhere to the feature request template. label Jun 28, 2022
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jun 28, 2022
@dkwon17 dkwon17 added area/dashboard area/editors severity/P2 Has a minor but important impact to the usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. area/editors labels Jun 28, 2022
@dkwon17
Copy link
Contributor Author

dkwon17 commented Jul 14, 2022

After spending more time with idling issues, I have some implementation ideas for this issue:

  • workspace has stopped due to a timeout:
    • che-machine-exec sets an annotation in the devworkspace metadata ("controller.devfile.io/stopped-by": "inactivity") when stopping a workspace due to inactivity. Have the dashboard read the devworkspace's annotation from the redux store to determine if the workspace has stopped due to inactivity.
  • workspace was not started in the first place:
    • If there is no "controller.devfile.io/stopped-by": "inactivity" annotation, then the workspace was not idled since this annotation is cleared on workspace startup
  • workspace was running, and then was stopped unexpectedly (need to investigate potential reasons why this might happen):
    • possibly read the status.conditions section of the devworkspace to see if it had stopped due to error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard kind/enhancement A feature request - must adhere to the feature request template. severity/P2 Has a minor but important impact to the usage or development of the system. sprint/next
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants