-
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
[Lens] Do not crash data panel on invalid KQL query #70712
Conversation
Pinging @elastic/kibana-app (Team:KibanaApp) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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 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.
@@ -198,10 +198,12 @@ export const InnerFieldItem = function InnerFieldItem(props: FieldItemProps) { | |||
className={`lnsFieldItem__info ${infoIsOpen ? 'lnsFieldItem__info-isOpen' : ''}`} | |||
data-test-subj={`lnsFieldListPanelField-${field.name}`} | |||
onClick={() => { | |||
togglePopover(); | |||
if (exists) { | |||
togglePopover(); |
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 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.
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
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:

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).