-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Correctly ignore system indices when validationg dot-prefixed indices #128868
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
base: main
Are you sure you want to change the base?
Conversation
Prior to this change, the (incorrect) assumption was that `threadContext.isSystemContext()` returned true when dealing with system indices. This was eventually revealed to be false (though there is a separate issue where we aren't emitting deprecation warnings when running locally, but that is a separate thing). To fix this, the `DotPrefixValidator` now correctly receives a `SystemIndices` instance and uses the `findMatchingDescriptor` and `findMatchingDataStreamDescriptor` methods to determine whether a system index is being referenced. When a matching descriptor is found, the warning emission is skipped.
Pinging @elastic/es-data-management (Team:Data Management) |
Hi @dakrone, I've created a changelog YAML for you. |
body: {foo: bar} | ||
|
||
- do: | ||
async_search.submit: |
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.
So this test fails before the addition to DotPrefixValidator
?
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.
Hmm… I thought that it would, but it doesn't appear to work. So I can remove this test. I'm not sure how to test this right now other than manual testing. I'll do some more digging to see how best to test this.
Prior to this change, the (incorrect) assumption was that
threadContext.isSystemContext()
returned true when dealing with system indices. This was eventually revealed to be false (though there is a separate issue where we aren't emitting deprecation warnings when running locally, but that is a separate thing).To fix this, the
DotPrefixValidator
now correctly receives aSystemIndices
instance and uses thefindMatchingDescriptor
andfindMatchingDataStreamDescriptor
methods to determine whether a system index is being referenced. When a matching descriptor is found, the warning emission is skipped.