-
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
[data views] Automatic loading of field lists will no longer error on empty field list #152059
[data views] Automatic loading of field lists will no longer error on empty field list #152059
Conversation
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.
@kertal I didn't want to change public api method behavior in case some code depends upon the failures. I guess I'm not up to speed on how the field list needs to handle this specific case. |
Wouldn't it be an opportunity to also clean change this, so maybe a follow up email to the one of @davismcphee, that we also change the behavior of this method. Now we have the attention? If we don't do this we would need to catch the error state in the field list, right @jughosta ? |
@kertal Yes, the warning in the field list is shown because there was a caught exception https://github.com/elastic/kibana/blob/main/src/plugins/unified_field_list/public/hooks/use_existing_fields.ts#L164 I'm fine with both: keeping a warning or setting |
@jughosta you're right, just 2 consumers, and one is unified field list, 2nd: Lines 97 to 109 in 84efdaa
Here |
@kertal Thats what I get for not looking, I made the change. |
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.
@elasticmachine merge upstream |
💚 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 @mattkime |
… 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
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. WhenallowNoIndices
is set to true, ES will return a valid empty set rather than a 404 error.Checklist