Skip to content

Conversation

@dakrone
Copy link
Member

@dakrone dakrone commented Jun 3, 2025

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.

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.
@dakrone dakrone added >bug :Data Management/Indices APIs APIs to create and manage indices and templates v9.1.0 v9.0.3 labels Jun 3, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Jun 3, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @dakrone, I've created a changelog YAML for you.

body: {foo: bar}

- do:
async_search.submit:
Copy link
Contributor

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?

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Data Management/Indices APIs APIs to create and manage indices and templates Team:Data Management Meta label for data/management team v9.0.9 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants