Skip to content
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

MetaFields advanced setting can break the index pattern autorefresh leading to no fields found #94356

Closed
lucabelluccini opened this issue Mar 10, 2021 · 3 comments · Fixed by #155811
Assignees
Labels
bug Fixes for quality problems that affect the customer experience :DataDiscovery/fix-it-week Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Settings editor Index settings editor UI impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.

Comments

@lucabelluccini
Copy link
Contributor

lucabelluccini commented Mar 10, 2021

Kibana version: 7.11+

Elasticsearch version: aligned

Describe the bug:

Setting the metaFields advanced setting to _source breaks the auto-refresh of index patterns.

Steps to reproduce:

  1. Spin up a Kibana instance
  2. Install the demo Kibana Log data
  3. Go in Advanced Settings / Edit the metaFields ands et it to _source
    image
  4. Go to the Index Patterns page and hit SHIFT+Refresh (or force a refresh)
  5. 500 errors pop ups show up with a Bad request
  6. Index Pattern has 0 fields

Expected behavior:

The Index Patterns should be updated, but not report 0 fields.

Provide logs and/or server output (if relevant):

If the metaFields is set to _source, the request is /api/index_patterns/_fields_for_wildcard?pattern=kibana_sample_data_logs&meta_fields=_source and we get bad request

If the metaFields is set to _source,, the request is /api/index_patterns/_fields_for_wildcard?pattern=kibana_sample_data_logs&meta_fields=_source&meta_fields= and it is successful, but we get a field named in the list of fields.
image

If the metaFields is set to an empty string, the request is: /api/index_patterns/_fields_for_wildcard?pattern=kibana_sample_data_logs& and it is successful. The list of fields is correct.

@lucabelluccini lucabelluccini added bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Settings editor Index settings editor UI labels Mar 10, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Jun 21, 2021
@kertal kertal added the Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. label Nov 21, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@jughosta
Copy link
Contributor

Linking to #57728

@lukasolson lukasolson self-assigned this Apr 25, 2023
lukasolson added a commit that referenced this issue Apr 27, 2023
## Summary

Resolves #94356.

Fixes an issue with the _fields_for_wildcard API when the value for
`metaFields` advanced setting is set to a single value (e.g. `_source`).

### Checklist

- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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

### Release note

Fixes an issue where having a single value for the advanced setting
`metaFields` would prevent refreshing a data view.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Apr 27, 2023
…155811)

## Summary

Resolves elastic#94356.

Fixes an issue with the _fields_for_wildcard API when the value for
`metaFields` advanced setting is set to a single value (e.g. `_source`).

### Checklist

- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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

### Release note

Fixes an issue where having a single value for the advanced setting
`metaFields` would prevent refreshing a data view.

(cherry picked from commit f1360f2)
kibanamachine referenced this issue Apr 27, 2023
…55811) (#156078)

# Backport

This will backport the following commits from `main` to `8.8`:
- [Fix issue with single value for metaFields advanced setting
(#155811)](#155811)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Lukas
Olson","email":"lukas@elastic.co"},"sourceCommit":{"committedDate":"2023-04-27T18:30:29Z","message":"Fix
issue with single value for metaFields advanced setting (#155811)\n\n##
Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/94356.\r\n\r\nFixes an issue
with the _fields_for_wildcard API when the value for\r\n`metaFields`
advanced setting is set to a single value (e.g. `_source`).\r\n\r\n###
Checklist\r\n\r\n- [
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### Release
note\r\n\r\nFixes an issue where having a single value for the advanced
setting\r\n`metaFields` would prevent refreshing a data
view.","sha":"f1360f2e4afabaf915f9ebb2551fab3b39eeb745","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Data
Views","Team:DataDiscovery","v8.8.0","v8.9.0"],"number":155811,"url":"https://github.com/elastic/kibana/pull/155811","mergeCommit":{"message":"Fix
issue with single value for metaFields advanced setting (#155811)\n\n##
Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/94356.\r\n\r\nFixes an issue
with the _fields_for_wildcard API when the value for\r\n`metaFields`
advanced setting is set to a single value (e.g. `_source`).\r\n\r\n###
Checklist\r\n\r\n- [
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### Release
note\r\n\r\nFixes an issue where having a single value for the advanced
setting\r\n`metaFields` would prevent refreshing a data
view.","sha":"f1360f2e4afabaf915f9ebb2551fab3b39eeb745"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155811","number":155811,"mergeCommit":{"message":"Fix
issue with single value for metaFields advanced setting (#155811)\n\n##
Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/94356.\r\n\r\nFixes an issue
with the _fields_for_wildcard API when the value for\r\n`metaFields`
advanced setting is set to a single value (e.g. `_source`).\r\n\r\n###
Checklist\r\n\r\n- [
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### Release
note\r\n\r\nFixes an issue where having a single value for the advanced
setting\r\n`metaFields` would prevent refreshing a data
view.","sha":"f1360f2e4afabaf915f9ebb2551fab3b39eeb745"}}]}] BACKPORT-->

Co-authored-by: Lukas Olson <lukas@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience :DataDiscovery/fix-it-week Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Settings editor Index settings editor UI impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants