Skip to content

Conversation

@qn895
Copy link
Member

@qn895 qn895 commented Jul 6, 2021

Summary

This PR fixes #102966 . Previously, when an error occurs, the Index Data Visualizer would show an error message that's not too helpful and would fail to load for all other fields.

Before
Note that because transaction.duration.histogram fails, all other fields in the index will also fail
image (5)

After
Here, only the fields in the same batch as transaction.duration.histogram would not show
Screen Shot 2021-07-06 at 17 00 28

Checklist

Delete any items that are not applicable to this PR.

@qn895 qn895 added bug Fixes for quality problems that affect the customer experience release_note:fix :ml v8.0.0 Feature:File and Index Data Viz ML file and index data visualizer v7.14.0 labels Jul 6, 2021
Copy link
Contributor

@peteharverson peteharverson 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

@spalger spalger added the v7.15.0 label Jul 7, 2021
// there could be multiple errors
if (Array.isArray(allStats.errors) && allStats.errors.length > 0) {
allStats.errors.forEach((err: any) => {
dataLoader.displayError(err.body?.message?.output?.payload ?? err);
Copy link
Member

Choose a reason for hiding this comment

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

it might be worth testing this error with our extractErrorProperties function to see if it displays it extracts the error text correctly, if so, I think we should copy that function over to tis plugin.
The shape of errors returned from es and kibana can depend on where they were thrown from, extractErrorProperties does a decent job of recognising all known error shapes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added the new utility here 4c2b680

@qn895 qn895 marked this pull request as ready for review July 9, 2021 17:09
@qn895 qn895 requested a review from a team as a code owner July 9, 2021 17:09
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@qn895
Copy link
Member Author

qn895 commented Jul 12, 2021

@elasticmachine merge upstream

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

LGTM

@qn895
Copy link
Member Author

qn895 commented Jul 13, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dataVisualizer 236 237 +1

Async chunks

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

id before after diff
dataVisualizer 1.1MB 1.1MB +3.5KB

History

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

@qn895 qn895 added the auto-backport Deprecated - use backport:version if exact versions are needed label Jul 13, 2021
@qn895 qn895 self-assigned this Jul 13, 2021
@qn895 qn895 merged commit 524e4d5 into elastic:master Jul 13, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jul 13, 2021
…#104567)

* Fix to show better error message

* Handle batch errors by still showing as much data as possible

* Fix i18n

* Fix errors

* Fix 404 error, add extractErrorProperties

* Fix missing histogram

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jul 13, 2021
…#104567)

* Fix to show better error message

* Handle batch errors by still showing as much data as possible

* Fix i18n

* Fix errors

* Fix 404 error, add extractErrorProperties

* Fix missing histogram

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.14
7.x

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jul 13, 2021
#105463)

* Fix to show better error message

* Handle batch errors by still showing as much data as possible

* Fix i18n

* Fix errors

* Fix 404 error, add extractErrorProperties

* Fix missing histogram

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Jul 13, 2021
#105464)

* Fix to show better error message

* Handle batch errors by still showing as much data as possible

* Fix i18n

* Fix errors

* Fix 404 error, add extractErrorProperties

* Fix missing histogram

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com>
@qn895 qn895 deleted the ml-dv-error-handling branch July 21, 2021 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed bug Fixes for quality problems that affect the customer experience Feature:File and Index Data Viz ML file and index data visualizer :ml release_note:fix v7.14.0 v7.15.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ML] Index Data Visualizer should support histogram type and better handle unsupported types

6 participants