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: Adds better error handling of workspace loading errors #1169

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

phantomjinx
Copy link
Member

  • Adds a status plugin for displaying errors messages if the workspace failed to load. Such errors can get lost in the console log and a blank page is the result in the client.

  • workspace.ts

    • If an error occurs then add them to a collection in the workspace
    • Provides an api for quizzing the workspace on whether it has errored
  • app-status

    • Plugin that is only active if
      • there is a current connection (no point in displaying if nothing has been connected to yet)
      • there are no mbeans collected from the jolokia connection
      • Errors were flagged from the workspace
    • Assuming the plugin is active, offer a component that provides notification of the workspace *

@phantomjinx
Copy link
Member Author

So I found I was having issues with the workspace being empty (due to an unrelated error) and the console message that the workspace was empty was buried in the console. What was more obvious was the blank page when a connection was attempted.

Therefore, the idea is to have a status plugin pop up that checks on the workspace. If it succeeds then the plugin never appears. However, if there is a failure then at least a single plugin is loaded and displayed giving the user some indication of the issue.

Screenshot_20241016_161139

@phantomjinx phantomjinx self-assigned this Oct 16, 2024
Copy link

github-actions bot commented Oct 16, 2024

Test Results

  8 files  ±0    8 suites  ±0   47m 20s ⏱️ + 2m 30s
 66 tests ±0   64 ✅ ±0   2 💤 ±0  0 ❌ ±0 
536 runs  ±0  508 ✅ ±0  28 💤 ±0  0 ❌ ±0 

Results for commit f0a8cd6. ± Comparison against base commit d12490c.

♻️ This comment has been updated with latest results.

Copy link
Member

@tadayosi tadayosi left a comment

Choose a reason for hiding this comment

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

Overall the enhancement looks great, but there are a few considerations we'd like to take care of a bit.

packages/hawtio/package.json Outdated Show resolved Hide resolved
packages/hawtio/src/plugins/app-status/globals.ts Outdated Show resolved Hide resolved
packages/hawtio/src/plugins/shared/workspace.ts Outdated Show resolved Hide resolved
packages/hawtio/package.json Outdated Show resolved Hide resolved
* Adds a status plugin for displaying errors messages if the workspace
  failed to load. Such errors can get lost in the console log and a blank
  page is the result in the client.

* workspace.ts
  * If an error occurs then add them to a collection in the workspace
  * Provides an api for quizzing the workspace on whether it has errored

* console-status
  * Plugin that is only active if
    * there is a current connection (no point in displaying if nothing
      has been connected to yet)
    * there are no mbeans collected from the jolokia connection
    * Errors were flagged from the workspace
  * Assuming the plugin is active, offer a component that provides
    notification of the workspace
 *
@tadayosi tadayosi merged commit 9b4c600 into hawtio:main Oct 18, 2024
12 of 13 checks passed
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.

2 participants