refactor search source warnings to return a single warning for 'is_partial' results#165512
refactor search source warnings to return a single warning for 'is_partial' results#165512nreese merged 49 commits intoelastic:mainfrom
Conversation
…-ref HEAD~1..HEAD --fix'
…-ref HEAD~1..HEAD --fix'
799d11a to
1385564
Compare
d4a7466 to
47ca3f9
Compare
…-ref HEAD~1..HEAD --fix'
…-ref HEAD~1..HEAD --fix'
|
@elasticmachine merge upstream |
42bb386 to
ee013d6
Compare
a2d7804 to
243464b
Compare
…-ref HEAD~1..HEAD --fix'
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
| return Object.values(state.layers).flatMap((layer) => | ||
| if (warning.type === 'incomplete') { | ||
| return hasUnsupportedDownsampledAggregationFailure(warning) | ||
| ? Object.values(state.layers).flatMap((layer) => |
There was a problem hiding this comment.
@dej611 can you do a sanity check on the TSDB behavior?
There was a problem hiding this comment.
There's a specific FTR test for this case. I see it passing, so all good by me 👍
stratoula
left a comment
There was a problem hiding this comment.
This looks good to me, I tested all editors and everything seems as expected. I just want a sanity check from Marco for downsampling warnings. He knows this area better than me
MichaelMarcialis
left a comment
There was a problem hiding this comment.
Thanks, @nreese. This looks good to me. I left a few small comments below, but nothing worth holding you up over. Assuming you're able to review those comments, approving now so we don't hold you up further.
-
I noticed that the warning callout's dismiss button is using a primary (blue) colored icon. Would it be more fitting to use a warning (yellow) colored icon instead?
-
Is it necessary to show the same warning(s) both in a callout above the table and using the warning count and popover on the visualization embed? Would it make sense to suppress the warning count and popover from the visualization embed to avoid the warning redundancy (and simply rely on the warning callout above the table)? I believe the visualization embeds were developed with the ability to suppress warnings/errors.
| .shardFailureModal__desc { | ||
| // set for IE11, since without it depending on the content the width of the list | ||
| // could be much higher than the available screenspace | ||
| max-width: 686px; | ||
| } |
There was a problem hiding this comment.
Do we still support IE11? If not, is this style necessary?
There was a problem hiding this comment.
Is IE11 still supported? This css is just moving an existing css file so this is not being added, just changing locations.
There was a problem hiding this comment.
It looks like IE11 is unsupported as of 7.9+ (leaving aside that this isn't new code): https://www.elastic.co/support/matrix.
| <FormattedMessage | ||
| id="data.search.searchSource.fetch.shardsFailedModal.showDetails" | ||
| id="data.search.searchSource.fetch.incompleteResultsModal.showDetails" | ||
| defaultMessage="Show details" |
There was a problem hiding this comment.
Would it be possible to change the Show details text to View details to match the verbiage we'll be using in the upcoming CCS updates?
There was a problem hiding this comment.
If we're changing it to View details here, we should also update the error callout used in Discover too for consistency:
| defaultMessage: 'Data might be incomplete because your request timed out', | ||
| type: 'incomplete', | ||
| message: i18n.translate('data.search.searchSource.fetch.incompleteResultsMessage', { | ||
| defaultMessage: 'The data might be incomplete or wrong.', |
There was a problem hiding this comment.
I understand we're trying to make the messaging more general-purpose to account for multiple issues. But would it make sense to reference shards and partial data within the warning somehow? Perhaps something like: Index shards returned partial data. Information displayed here may be incomplete or incorrect.?
There was a problem hiding this comment.
At this level, the messaging should be high level. It would not be practical to explain why there is incomplete data in this message since there are some many different reasons for incomplete data and such a small space. More knowledgable users (or curious users) can explore the "detailed why" by clicking "view details". In the future, this will open #166021. This is give the user all of the context of why data is incomplete with screen real estate to clearly explain what is missing.
Resolved with 8f4f8cf
This is existing behavior and is not impacted by this PR. I will leave it up to the @elastic/kibana-data-discovery team to make this change in the future. |
davismcphee
left a comment
There was a problem hiding this comment.
No code review, just responding to some feedback.
Is it necessary to show the same warning(s) both in a callout above the table and using the warning count and popover on the visualization embed? Would it make sense to suppress the warning count and popover from the visualization embed to avoid the warning redundancy (and simply rely on the warning callout above the table)? I believe the visualization embeds were developed with the ability to suppress warnings/errors.
This is existing behavior and is not impacted by this PR. I will leave it up to the @elastic/kibana-data-discovery team to make this change in the future.
These warnings are for different requests, since the vis request is separate from the data grid request. In some cases one may return a warning while the other succeeds, and you would only see one warning in the UI in these cases.
It may make sense from a UX perspective to capture the vis warnings and somehow merge them with the data grid warnings, but currently the warnings are shown where they occurred and I would consider any attempt at merging them as a separate effort from this work.
| .shardFailureModal__desc { | ||
| // set for IE11, since without it depending on the content the width of the list | ||
| // could be much higher than the available screenspace | ||
| max-width: 686px; | ||
| } |
There was a problem hiding this comment.
It looks like IE11 is unsupported as of 7.9+ (leaving aside that this isn't new code): https://www.elastic.co/support/matrix.
| <FormattedMessage | ||
| id="data.search.searchSource.fetch.shardsFailedModal.showDetails" | ||
| id="data.search.searchSource.fetch.incompleteResultsModal.showDetails" | ||
| defaultMessage="Show details" |
There was a problem hiding this comment.
If we're changing it to View details here, we should also update the error callout used in Discover too for consistency:
stratoula
left a comment
There was a problem hiding this comment.
Visualizations team changes LGTM!
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
History
To update your PR or re-run it, just comment with: |
Found duplicated type ShardFailure in data plugin. Same type removed from `src/plugins/data/public/shard_failure_modal/shard_failure_types.ts` in #165512. This PR removes some unneeded types from `src/plugins/data/common/search/search_source/types.ts`. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>


Closes #164905
This PR replaces individual shard failure and timeout warnings with a single "incomplete data" warning. This work is required for #163381
Test instructions