-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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] allow cross cluster index pattern negation #147968
[data views] allow cross cluster index pattern negation #147968
Conversation
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
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 👍 I've tested by using the testdata of https://github.com/elastic/sdh-kibana/issues/3426#issue-1499146702
Before this change I got a mapping conflict:
With this PR, the index causing the mapping conflict was excluded correctly, so there's no more mapping conflict:
## Summary The data views api examines comma delimited sections to see if there are matching indices before fetching the field list. The existing code checked for index pattern negation - patterns that started with a `-`. However, it didn't check for this in cross cluster case - `this_cluster:-kibana*`. The code now handles the cross cluster case appropriately. Still, its unclear to me whether this logic is necessary, hence why I opened elastic#147970 - I was able to resolve the failed tests most familiar to me but I will need to work with engineers from other teams to investigate other failures. Closes elastic#147926 (cherry picked from commit e3cac21)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… (#148206) # Backport This will backport the following commits from `main` to `8.6`: - [[data views] allow cross cluster index pattern negation (#147968)](#147968) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Matthew Kime","email":"[email protected]"},"sourceCommit":{"committedDate":"2022-12-29T15:51:20Z","message":"[data views] allow cross cluster index pattern negation (#147968)\n\n## Summary\r\n\r\nThe data views api examines comma delimited sections to see if there are\r\nmatching indices before fetching the field list. The existing code\r\nchecked for index pattern negation - patterns that started with a `-`.\r\nHowever, it didn't check for this in cross cluster case -\r\n`this_cluster:-kibana*`. The code now handles the cross cluster case\r\nappropriately.\r\n\r\nStill, its unclear to me whether this logic is necessary, hence why I\r\nopened #147970 - I was able to\r\nresolve the failed tests most familiar to me but I will need to work\r\nwith engineers from other teams to investigate other failures.\r\n\r\nCloses #147926 Views","Team:DataDiscovery","backport:prev-minor","v8.7.0"],"number":147968,"url":"#147968 views] allow cross cluster index pattern negation (#147968)\n\n## Summary\r\n\r\nThe data views api examines comma delimited sections to see if there are\r\nmatching indices before fetching the field list. The existing code\r\nchecked for index pattern negation - patterns that started with a `-`.\r\nHowever, it didn't check for this in cross cluster case -\r\n`this_cluster:-kibana*`. The code now handles the cross cluster case\r\nappropriately.\r\n\r\nStill, its unclear to me whether this logic is necessary, hence why I\r\nopened #147970 - I was able to\r\nresolve the failed tests most familiar to me but I will need to work\r\nwith engineers from other teams to investigate other failures.\r\n\r\nCloses #147926 views] allow cross cluster index pattern negation (#147968)\n\n## Summary\r\n\r\nThe data views api examines comma delimited sections to see if there are\r\nmatching indices before fetching the field list. The existing code\r\nchecked for index pattern negation - patterns that started with a `-`.\r\nHowever, it didn't check for this in cross cluster case -\r\n`this_cluster:-kibana*`. The code now handles the cross cluster case\r\nappropriately.\r\n\r\nStill, its unclear to me whether this logic is necessary, hence why I\r\nopened #147970 - I was able to\r\nresolve the failed tests most familiar to me but I will need to work\r\nwith engineers from other teams to investigate other failures.\r\n\r\nCloses #147926"}}]}] BACKPORT--> Co-authored-by: Matthew Kime <[email protected]>
Summary
The data views api examines comma delimited sections to see if there are matching indices before fetching the field list. The existing code checked for index pattern negation - patterns that started with a
-
. However, it didn't check for this in cross cluster case -this_cluster:-kibana*
. The code now handles the cross cluster case appropriately.Still, its unclear to me whether this logic is necessary, hence why I opened #147970 - I was able to resolve the failed tests most familiar to me but I will need to work with engineers from other teams to investigate other failures.
Closes #147926