-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Expose Elasticsearch accuracy warnings to the user #116632
Conversation
08a6354
to
377ccc4
Compare
Pinging @elastic/kibana-vis-editors (Team:VisEditors) |
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.
some smaller nits.
Could we add a Unit test for this to the terms aggconfig?
@ghudgins about the wording of the error message - not sure how we should do this. Does talking about aggregations here makes sense (as it’s not a Lens concept)? Should we make it more general? Also, Maybe we should mention a possible workaround with increasing the size. Maybe linking to a paragraph in the doc to be able to better explain what’s going on?
x-pack/plugins/lens/public/indexpattern_datasource/time_shift_utils.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/lens/public/indexpattern_datasource/time_shift_utils.tsx
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
@elasticmachine merge upstream |
da7ccb5
to
1b0b96f
Compare
Sorry for the delay. I think we should focus on what the user can do and not necessarily an administrator. Maybe something like Top values for this visualization may be approximate due to how the data is indexed. Try increasing the number of Top values or use Filters instead of Top values for precise results. To learn more about this limit, visit the documentation. |
+1 to what @ghudgins says about focusing the message on what the user can do.
Regarding this messaging, would it be possible and/or desirable to also have reference to |
@MichaelMarcialis nice idea, I don't think that can hurt (as long as it's simple to do technically). I love "errors" that have "actions" on them |
Let's go with just the warning for the first version - this kind of action is pretty complex to implement into our current structure. It makes a lot of sense to provide it though, I will open a separate issue for it. |
# Conflicts: # test/interpreter_functional/snapshots/baseline/combined_test3.json # test/interpreter_functional/snapshots/baseline/final_output_test.json # test/interpreter_functional/snapshots/baseline/metric_all_data.json # test/interpreter_functional/snapshots/baseline/metric_empty_data.json # test/interpreter_functional/snapshots/baseline/metric_multi_metric_data.json # test/interpreter_functional/snapshots/baseline/metric_percentage_mode.json # test/interpreter_functional/snapshots/baseline/metric_single_metric_data.json # test/interpreter_functional/snapshots/baseline/partial_test_2.json # test/interpreter_functional/snapshots/baseline/step_output_test3.json # test/interpreter_functional/snapshots/session/combined_test3.json # test/interpreter_functional/snapshots/session/final_output_test.json # test/interpreter_functional/snapshots/session/metric_all_data.json # test/interpreter_functional/snapshots/session/metric_empty_data.json # test/interpreter_functional/snapshots/session/metric_multi_metric_data.json # test/interpreter_functional/snapshots/session/metric_percentage_mode.json # test/interpreter_functional/snapshots/session/metric_single_metric_data.json # test/interpreter_functional/snapshots/session/partial_test_2.json # test/interpreter_functional/snapshots/session/step_output_test3.json
That's great @alexwizp - one small nit about the message: Could the leading "Top values" be replaced with the label of the column? Just to make it easier for the user to find it in case there is more than one top values in the current chart. |
@elastic/kibana-app-services please 👀 |
@elastic/kibana-app-services please review |
warningMessages.push( | ||
<FormattedMessage | ||
id="xpack.lens.indexPattern.precisionErrorWarning" | ||
defaultMessage="{docCount} values for a terms aggregation may be approximate. As a result, any sub-aggregations on the terms aggregation may also be approximate." |
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.
nit: how do we know here that it was a terms aggregation that may be approximate ? it seems that hasPrecissionError could theoretically exist on any aggregation ?
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.
@ppisljar no, hasPrecissionError
is calculated for terms
only. For other kinds of aggregations, hasPrecisionError
method is undefined.
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.
code LGTM
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 with FF and Safari 👍
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Test Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @alexwizp |
…6632) * [Lens] Expose Elasticsearch accuracy warnings to the user Closes: elastic#94918 * fix comments * update text Co-authored-by: Kibana Machine <[email protected]>
…6632) * [Lens] Expose Elasticsearch accuracy warnings to the user Closes: elastic#94918 * fix comments * update text Co-authored-by: Kibana Machine <[email protected]>
* [Lens] Expose Elasticsearch accuracy warnings to the user Closes: #94918 * fix comments * update text Co-authored-by: Kibana Machine <[email protected]>
…6632) * [Lens] Expose Elasticsearch accuracy warnings to the user Closes: elastic#94918 * fix comments * update text Co-authored-by: Kibana Machine <[email protected]>
Closes: #94918
Summary
Lens
should show warnings when sort by ascending results fromelasticsearch
include the unbounded error warning: "doc_count_error_upper_bound" :-1 or greater than 0
Screens
Testing notes:
DevTools
and execute the following 2 commandstest
indexExpected result:
precision error warning message should be shown