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

[Discover] Add EuiErrorBoundary to catch errors in the functionals #117976

Merged
merged 5 commits into from
Nov 16, 2021

Conversation

majagrubic
Copy link
Contributor

@majagrubic majagrubic commented Nov 9, 2021

Summary

The primary use of this is to catch the error in:
#81576

This test occasionally fails, with a completely blank screen and is extremely flaky, so hard to reproduce. But the EuiErrorBoundary should helps us with other failures as well.

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@majagrubic majagrubic changed the title [Discover] Unskip histogram test [Discover] Add EuiErrorBoundary to catch errors in the functionals Nov 9, 2021
@majagrubic
Copy link
Contributor Author

@elasticmachine merge upstream

@majagrubic majagrubic marked this pull request as ready for review November 9, 2021 15:36
@majagrubic majagrubic requested a review from a team as a code owner November 9, 2021 15:36
@majagrubic majagrubic added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Nov 9, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@@ -96,21 +97,23 @@ export function DiscoverMainApp(props: DiscoverMainProps) {
}, [resetSavedSearch, savedSearch]);

return (
<DiscoverLayoutMemoized
Copy link
Member

Choose a reason for hiding this comment

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

LGTM, only thing to consider, adding the EuiErrorBoundary in discover_router.tsx would also cover executions in routing, context and doc view. So it would be one EuiErrorBoundray to catch em all 🧙

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would that not be too aggressive?

Copy link
Member

Choose a reason for hiding this comment

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

Would there be a disadvantage to catch more potential failures causing a empty Discover rendering? Seen other plugins doing it too:

Copy link
Member

Choose a reason for hiding this comment

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

change LGTM, will test and then approve

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Test Failures

  • [job] [logs] Default Firefox Tests / InfraOps App Metrics UI Home page with metrics present change color palette

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
discover 312.2KB 312.3KB +39.0B

History

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

@elastic elastic deleted a comment from kibanamachine Nov 15, 2021
@majagrubic majagrubic requested a review from kertal November 15, 2021 13:22
Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

LGTM; added and error deep down in the component tree, and the EuiErrorBoundary was displayed:
Bildschirmfoto 2021-11-15 um 18 55 05

@majagrubic majagrubic merged commit 8873a48 into elastic:main Nov 16, 2021
@majagrubic majagrubic deleted the fix-81576 branch November 16, 2021 10:57
majagrubic pushed a commit to majagrubic/kibana that referenced this pull request Nov 16, 2021
…lastic#117976)

* [Discover] Add error boundary to cath errors in functionals

* Fix invalid import

* Move <EuiErrorBoundary> to router

Co-authored-by: Kibana Machine <[email protected]>
majagrubic pushed a commit that referenced this pull request Nov 16, 2021
…117976) (#118664)

* [Discover] Add error boundary to cath errors in functionals

* Fix invalid import

* Move <EuiErrorBoundary> to router

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
mbondyra pushed a commit to mbondyra/kibana that referenced this pull request Nov 19, 2021
…lastic#117976)

* [Discover] Add error boundary to cath errors in functionals

* Fix invalid import

* Move <EuiErrorBoundary> to router

Co-authored-by: Kibana Machine <[email protected]>
dmlemeshko pushed a commit that referenced this pull request Nov 29, 2021
…117976)

* [Discover] Add error boundary to cath errors in functionals

* Fix invalid import

* Move <EuiErrorBoundary> to router

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants