-
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] Formula: better messages for unsupported field types #114528
Conversation
@elasticmachine merge upstream |
Pinging @elastic/kibana-vis-editors (Team:VisEditors) |
@elasticmachine merge upstream |
The code looks good, but there's one more case that you maybe wanna tackle here? :D
The problem is that this error persists until you correct your syntax and get a correct outcome (so doesn't update to 'incorrect syntax error' when modifying the syntax)
|
I'll try to give a look to this, but it is really a different type of error, as it is something at runtime rather than configuration time. I'm 100% with you that the error message should be improved on that side, so I'll check how hard is to fix it here or rather deserves its own issue to track. |
I've attempted to fix the raised problem above, but that required to make some strong assumptions: there' no, in fact, a way to know from the configuration side if a valid expression produced an error or just didn't find any data. While the provided fix works fine for a scenario where the expression evaluation led to an error, it also kicks in when the current visualization has no data for any other reason (i.e. small time range?). |
I think it's the best we can do atm. I'll retest and come back to you. |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
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.
LGTM, tested and works as expected!
…114528) * 🐛 Fix wrong error message for wrong data types * 👌 Add one more special case to show error message Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…#115906) * 🐛 Fix wrong error message for wrong data types * 👌 Add one more special case to show error message Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
Summary
Fixes #111285
Improve
last_value
error validation and additional formula validation for unsupported data types: note that this means that there are 2 distinct error types now (just extended a case for an existing one tbh).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:
For maintainers