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

[7.x] [Security Solutions] Critical bug to add network responses to error toasters (#97945) #98430

Merged
merged 1 commit into from
Apr 27, 2021

Conversation

FrankHassanabad
Copy link
Contributor

Backports the following commits to 7.x:

…oasters (elastic#97945)

## Summary

When we updated our codebase to use the newer bsearch/async search, we ended up using error messages which were not the same as we had before which would show the network errors in the full message when the "see full error button" was clicked.

This has been bad lately as users and quality assurance people have been posting screen shots that have very little information, blank error messages, and/or stack traces instead of network errors. This makes them think the code has issues when it is a configuration issue or a networking issue that is happening.

This PR does the following:
* Changes all the bsearch queries to use the use useAppToasts
* Modifies the useAppToasts to be able to transform bsearch with the kibana global notification
* Cleans up the useAppToasts some
* Deprecates the GlobalErrorToaster in favor of the useAppToasts
* Fixes and adds a few i18n missing strings found
* Removes most of the deprecated error dispatch toasters from detection_engine except for 1 place where it is not a hook.
 
Before screen shot of errors with no buttons and messages that were not pointing to network errors:
<img width="422" alt="Screen Shot 2021-04-21 at 4 24 45 PM" src="https://user-images.githubusercontent.com/1151048/115642119-9a942300-a2d7-11eb-955a-b51097a8d3ec.png">


After screen shot where you have a button and that button will show you the network error:
<img width="395" alt="Screen Shot 2021-04-21 at 3 26 12 PM" src="https://user-images.githubusercontent.com/1151048/115642216-c6170d80-a2d7-11eb-8c94-0a1c15186fab.png">

<img width="786" alt="Screen Shot 2021-04-21 at 3 26 21 PM" src="https://user-images.githubusercontent.com/1151048/115642222-ca432b00-a2d7-11eb-9ddd-4ed6c6270b94.png">

You can manually test this easily by making non ECS indexes to cause errors and then add them as a kibana index and use them in the data sourcer.

### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
@FrankHassanabad FrankHassanabad enabled auto-merge (squash) April 26, 2021 22:26
@FrankHassanabad FrankHassanabad self-assigned this Apr 26, 2021
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 2170 2172 +2

Async chunks

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

id before after diff
securitySolution 7.0MB 7.0MB +1.4KB

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

cc @FrankHassanabad

@FrankHassanabad FrankHassanabad merged commit 4a35c1a into elastic:7.x Apr 27, 2021
@FrankHassanabad FrankHassanabad deleted the backport/7.x/pr-97945 branch April 27, 2021 00:31
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.

2 participants