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

[ML] Explain Log Rate Spikes: Fix error handling. #137947

Merged
merged 8 commits into from
Aug 4, 2022

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Aug 3, 2022

Summary

Part of #136265.

  • Errors on the application level were not correctly surfaced in the UI. This PR fixes it by combining "transport" stream errors and application errors in a callout above the analysis results table.
  • This also fixes the problem where a partly populated results table would turn empty again when used with the error prop of EUI's table. We now keep the table on display an show the errors above it in the callout.

image

@walterra walterra added bug Fixes for quality problems that affect the customer experience :ml release_note:skip Skip the PR/issue when compiling release notes v8.4.0 v8.5.0 labels Aug 3, 2022
@walterra walterra requested a review from a team as a code owner August 3, 2022 09:47
@walterra walterra self-assigned this Aug 3, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@@ -45,6 +47,8 @@ export function streamReducer(
return cp;
});
return { ...state, changePoints };
case API_ACTION_NAME.ERROR:
return { ...state, errors: [...state.errors, action.payload] };
case API_ACTION_NAME.RESET:
return initialState;
case API_ACTION_NAME.UPDATE_LOADING_STATE:
Copy link
Contributor

Choose a reason for hiding this comment

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

do you need to reset errors on UPDATE_LOADING_STATE?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The attributes updated related to "loading state" do not cover errors and we want to retain errors while the analysis might still continue. Only on a reset (e.g. when starting a new request) the original default state without errors will be restored.

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

Tested and LGTM ⚡

@qn895
Copy link
Member

qn895 commented Aug 3, 2022

I'm getting this error with the latest commit fbb4abb

Screen.Recording.2022-08-03.at.10.37.57.mov

Rebootstrapped and didn't get this anymore. Functionally LGTM 🎉

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
aiops 476.2KB 477.0KB +857.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @walterra

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

LGTM

@walterra walterra merged commit 70efbf0 into elastic:main Aug 4, 2022
@walterra walterra deleted the ml-aiops-fix-error-handling branch August 4, 2022 13:23
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 4, 2022
- Errors on the application level were not correctly surfaced in the UI. This PR fixes it by combining "transport" stream errors and application errors in a callout above the analysis results table.
- This also fixes the problem where a partly populated results table would turn empty again when used with the error prop of EUI's table. We now keep the table on display an show the errors above it in the callout.

(cherry picked from commit 70efbf0)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.4

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Aug 4, 2022
…lastic#138115)

- Errors on the application level were not correctly surfaced in the UI. This PR fixes it by combining "transport" stream errors and application errors in a callout above the analysis results table.
- This also fixes the problem where a partly populated results table would turn empty again when used with the error prop of EUI's table. We now keep the table on display an show the errors above it in the callout.

(cherry picked from commit 70efbf0)

Co-authored-by: Walter Rafelsberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience :ml release_note:skip Skip the PR/issue when compiling release notes v8.4.0 v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants