-
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
[DataViews] Remove No matching indices found
toasts 🍞
#151788
Conversation
onMissingIndices
to DataViews API handing the state of missing indices seperately
onMissingIndices
to DataViews API handing the state of missing indices seperatelyNo matching indices
toasts 🍞
No matching indices
toasts 🍞No matching indices found
toasts 🍞
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
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.
Changes look good and work well!
Is there a plan to remove |
@neptunian I think it still preserves the field list if its saved to the data view. That said, there's some |
💚 Build Succeeded
Metrics [docs]Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @kertal |
## Summary This PR removes the `No matching indices found ` toasts, part of some toast storms . The toasts were triggered when there were no matching indices of a given data view's index pattern. If indication is needed, that there are no available matching indices (it could also be an issue of lack of permissions to the requested indices), it's easy to check following property of an existing data view, if the length of matchedIndices is 0, this equals a 'indices are missing condition`.
… empty field list (#152059) ## Summary Part of #151670 and follow up to #151788 When a data view is loaded, it automatically loads its field list. Previously, it would error if the index pattern failed to match an index. Going forward, this will be treated as a valid empty state - `allowNoIndices` is being passed to the field_caps requests. When `allowNoIndices` is set to true, ES will return a valid empty set rather than a 404 error. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
… empty field list (elastic#152059) ## Summary Part of elastic#151670 and follow up to elastic#151788 When a data view is loaded, it automatically loads its field list. Previously, it would error if the index pattern failed to match an index. Going forward, this will be treated as a valid empty state - `allowNoIndices` is being passed to the field_caps requests. When `allowNoIndices` is set to true, ES will return a valid empty set rather than a 404 error. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary #151788 established that data views would no longer error when they failed to retrieve a field list. This index pattern validation code exists since previously ALL index pattern segments needed to match in order to avoid an error response from field caps, rather than just one. Now we can remove the validation code and simply pass the index pattern to field caps directly. ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: shahzad31 <shahzad31comp@gmail.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary Since #151788 landed, there's no need to insert `allowNoIndex` at the Lens level. Still no toasts: <img width="1901" alt="Screenshot 2023-03-29 at 4 30 58 PM" src="https://user-images.githubusercontent.com/315764/228676314-b9ba2add-a404-43ec-a9d8-b1d3b562ba2f.png"> Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Summary
This is a toast-flavored SDH investigation that became a PR ...
Fixes #151670
This PR removes the
No matching indices found
toasts, part of some toast storms . The toasts were triggered when there were no matching indices of a given data view's index pattern.If indication is needed, that there are no available matching indices (it could also be an issue of lack of permissions to the requested indices), it's easy to check following property of an existing data view, if the length of matchedIndices is 0, this equals a 'indices are missing condition`.
kibana/src/plugins/data_views/common/data_views/data_view.ts
Lines 151 to 153 in c7b742c
Examples for 🍞 not being displayed because of this:
Testing
Transforms
, create a transform based on one of demo data sets, more transforms based on different data views ... more toastsConsole
, but not the data viewsTransforms
... no toastsChecklist