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

Add console logging che-server exception messages #913

Merged
merged 3 commits into from
Sep 8, 2023
Merged

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Sep 5, 2023

What does this PR do?

Add console error logging on che-server failure:
Screenshot 2023-09-05 at 10 58 40

What issues does this PR fix or reference?

fixes eclipse-che/che#22423

Is it tested? How?

  1. Deploy che from quay.io/ivinokur/che-server:next image (throws an error on token provisioning).
  2. Add a PAT from the dashboard page
  3. Refresh the page and see an error.
  4. Open the browser console and see the original exception message and trace.

Release Notes

Docs PR

Signed-off-by: Igor <ivinokur@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Sep 5, 2023

Click here to review and test in web IDE: Contribute

console.error(e.message);
}
if (e.response && e.response.data && e.response.data.trace) {
console.error(e.response.data.trace.join('\n'));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
console.error(e.response.data.trace.join('\n'));
console.error(common.helpers.errors.getMessage(e));

@vinokurig Could you move the next code e.response.data.trace.join('\n') into 'getMessage' function (https://github.com/eclipse-che/che-dashboard/blob/main/packages/common/src/helpers/errors.ts#L63-L65) ?

Copy link
Contributor Author

@vinokurig vinokurig Sep 6, 2023

Choose a reason for hiding this comment

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

This is a stack trace list and it is provision error specific, so it makes no sense to put it into the common error class.

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

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

Copy link
Contributor

@akurinnoy akurinnoy left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

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

@artaleks9
Copy link
Contributor

artaleks9 commented Sep 8, 2023

  • Verified on Eclipse Che with quay.io/ivinokur/che-server:next and quay.io/eclipse/che-dashboard:pr-913 -
    worsk properly
  • Screenshots:

error-after-refresh

browser-console-error

@openshift-ci
Copy link

openshift-ci bot commented Sep 8, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akurinnoy, artaleks9, ibuziuk, vinokurig

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

@openshift-ci
Copy link

openshift-ci bot commented Sep 8, 2023

New changes are detected. LGTM label has been removed.

@github-actions
Copy link

github-actions bot commented Sep 8, 2023

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

@openshift-ci
Copy link

openshift-ci bot commented Sep 8, 2023

@vinokurig: 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/v11-dashboard-happy-path 4211ca0 link true /test v11-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.

@vinokurig vinokurig merged commit f0ef08e into main Sep 8, 2023
9 checks passed
@vinokurig vinokurig deleted the che-22354 branch September 8, 2023 13:01
@devstudio-release
Copy link

Build 3.10 :: dashboard_3.x/323: Console, Changes, Git Data

@devstudio-release
Copy link

Build 3.10 :: dashboard_3.x/322: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.10 :: dashboard_3.x/323: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/4415 triggered

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.10 :: dashboard_3.x/322: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/4414 triggered

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.10 :: dashboard_3.x/324: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.10 :: dashboard_3.x/324: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/4440 triggered

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.10 :: get-sources-rhpkg-container-build_3.x/4251: FAILURE

devspaces-operator-bundle : 3.x :: Failed in 55223149 : BREW:BUILD/STATUS:UNKNOWN
FAILURE:; copied to quay

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.

Add "Logs" expand button to the Dashboard 'Backend is not available.' view
7 participants