Skip to content

[Lens] Do not crash data panel on invalid KQL query#70712

Merged
flash1293 merged 5 commits intoelastic:masterfrom
flash1293:lens/kql-error-handling
Jul 9, 2020
Merged

[Lens] Do not crash data panel on invalid KQL query#70712
flash1293 merged 5 commits intoelastic:masterfrom
flash1293:lens/kql-error-handling

Conversation

@flash1293
Copy link
Copy Markdown
Contributor

Fixes #69734

So I think this should be handled within the query bar itself as well (maybe using the error state of the input to show something is off?). Also, the error message esaggs is emitting could be more user friendly. I will create a separate issue for the app arch team for this.

But for the specific case and in the interest of fixing this for 7.9 I think we should behave like the user has entered a query that didn't return any data:
behavior

This PR also removes the "field info" popover behavior for fields without data - it doesn't really make sense to show field info for an empty field (this simplifies the problem because otherwise we would need the same handling for the field item component).

@flash1293 flash1293 marked this pull request as ready for review July 3, 2020 15:21
@flash1293 flash1293 requested a review from a team July 3, 2020 15:21
@flash1293 flash1293 added the Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// label Jul 3, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@flash1293
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@flash1293
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

Copy link
Copy Markdown
Contributor

@wylieconlon wylieconlon left a comment

Choose a reason for hiding this comment

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

Tested locally, and the workaround LGTM. The error message from esaggs would be useful if we showed it with line-breaks, but I don't think that's needed here.

onClick={() => {
togglePopover();
if (exists) {
togglePopover();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The previous behavior here was confusing, but actually sort of useful, where the click state could be used to debug issues with the exists logic. I don't think it needs to be changed here.

@flash1293
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@flash1293
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

@flash1293 flash1293 merged commit 269c62a into elastic:master Jul 9, 2020
flash1293 added a commit to flash1293/kibana that referenced this pull request Jul 9, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
flash1293 added a commit that referenced this pull request Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Lens release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.9.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Lens] Datapanel disappears when typing invalid KQL syntax

4 participants