-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Conversation
Pinging @elastic/ml-ui (:ml) |
...plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx
Outdated
Show resolved
Hide resolved
...plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx
Outdated
Show resolved
Hide resolved
@@ -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: |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and LGTM ⚡
Rebootstrapped and didn't get this anymore. Functionally LGTM 🎉 |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @walterra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- 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)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…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]>
Summary
Part of #136265.
error
prop of EUI's table. We now keep the table on display an show the errors above it in the callout.