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

Dashboard frontend sanity check #682

Merged
merged 14 commits into from
Dec 6, 2022
Merged

Dashboard frontend sanity check #682

merged 14 commits into from
Dec 6, 2022

Conversation

akurinnoy
Copy link
Contributor

@akurinnoy akurinnoy commented Nov 25, 2022

What does this PR do?

This PR adds the custom redux middleware to the dashboard. The middleware triggers the sanity check each time before requesting either the che-server API or the dashboard backend. The sanity check results get cached, so no unnecessary extra requests will be done.
If the sanity check fails, only one error alert will be shown. All other error alerts will be suppressed.

Screenshots

In preload phase Screenshot 2022-11-28 at 17 00 31
When the dashboard loaded Screenshot 2022-11-29 at 11 21 54

What issues does this PR fix or reference?

eclipse-che/che#21799
- add API sanity check with a single request to prevent showing multiple error messages
- if after all checks above and re-tries API is still failing we show a single error with the session expired message and redirect to the login page

Is it tested? How?

  1. Open the dashboard in two windows simultaneously and sign in: https://devspaces.apps.cluster-7q8gj.7q8gj.sandbox838.opentlc.com/
  2. To test this fix in preload phase:
    • Press Ctrl(Cmd)+R in the first window and immediately sign out in the second window.
    • You should see the error page with the corresponding message;
  3. To test the fix in the running application
    • Wait at least 30 seconds after the dashboard is loaded;
    • Sign out in one of the opened windows;
    • Open the workspaces list page in the second window;
    • You should see the error alert notification.

@che-bot
Copy link
Contributor

che-bot commented Nov 25, 2022

Click here to review and test in web IDE: Contribute

@github-actions
Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-682

@che-bot
Copy link
Contributor

che-bot commented Nov 28, 2022

Click here to review and test in web IDE: Contribute

@github-actions
Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-682

@ibuziuk ibuziuk self-requested a review November 29, 2022 10:04
@olexii4
Copy link
Contributor

olexii4 commented Nov 29, 2022

I think it is not very clear to have only one temporary error message, which will be hidden after 10 seconds in the case when the session expired:

Знімок екрана 2022-11-29 о 16 46 27

It is much better to have the message with the refreshing timer which we have when opening the 'User Preferences' page:

Знімок екрана 2022-11-29 о 16 46 10

@ibuziuk WDYT?

@ibuziuk
Copy link
Member

ibuziuk commented Nov 29, 2022

@olexii4 @akurinnoy I actually like the current UX with User session has expired message

@che-bot
Copy link
Contributor

che-bot commented Nov 30, 2022

Click here to review and test in web IDE: Contribute

@akurinnoy
Copy link
Contributor Author

@ibuziuk @olexii4 with the last fixes, the session expiration alert won't be closed by timeout.

@che-bot
Copy link
Contributor

che-bot commented Dec 1, 2022

Click here to review and test in web IDE: Contribute

@github-actions
Copy link

github-actions bot commented Dec 1, 2022

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-682

@openshift-ci
Copy link

openshift-ci bot commented Dec 1, 2022

@akurinnoy: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/v10-dashboard-happy-path 44643c2 link true /test v10-dashboard-happy-path

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.

@openshift-ci
Copy link

openshift-ci bot commented Dec 6, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akurinnoy, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@akurinnoy akurinnoy merged commit 9aa4b41 into main Dec 6, 2022
@akurinnoy akurinnoy deleted the sanity-check branch December 6, 2022 10:25
@devstudio-release
Copy link

Build 3.4 :: dashboard_3.x/153: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

@che-bot che-bot added this to the 7.58 milestone Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants