-
Notifications
You must be signed in to change notification settings - Fork 25.4k
System data streams incorrectly show up in the list of template validation problems #128161
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
System data streams incorrectly show up in the list of template validation problems #128161
Conversation
Pinging @elastic/es-data-management (Team:Data Management) |
Hi @masseyke, I've created a changelog YAML for you. |
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.
LGTM, I left one really minor suggestion for the changelog entry wording. Thanks for fixing this Keith!
Oh also, since this is going to 9.0.x, can you backport to 8.18.x also? |
Co-authored-by: Lee Hinman <dakrone@users.noreply.github.com>
💔 Backport failed
You can use sqren/backport to manually backport by running |
…ation problems (elastic#128161) (cherry picked from commit 928fe1e) # Conflicts: # server/src/main/java/org/elasticsearch/cluster/metadata/MetadataIndexTemplateService.java # server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexTemplateServiceTests.java # test/framework/src/main/java/org/elasticsearch/cluster/metadata/DataStreamTestHelper.java
…ation problems (elastic#128161) (cherry picked from commit 928fe1e) # Conflicts: # server/src/main/java/org/elasticsearch/cluster/metadata/MetadataIndexTemplateService.java # server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexTemplateServiceTests.java # test/framework/src/main/java/org/elasticsearch/cluster/metadata/DataStreamTestHelper.java
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…ation problems (elastic#128161) (cherry picked from commit 928fe1e) # Conflicts: # server/src/main/java/org/elasticsearch/cluster/metadata/MetadataIndexTemplateService.java # server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexTemplateServiceTests.java # test/framework/src/main/java/org/elasticsearch/cluster/metadata/DataStreamTestHelper.java
If a user attempts to change an index template in a way that would make a data stream no longer valid, the response incorrectly includes the names of any system data streams (such as
.fleet-actions-results
) that happen to exist. For example, say I have a non-system data stream that matches a data stream templatetemplate1
with priority 300. It also matches a non-data-stream templatetemplate2
with priority 200, but that one is not in effect since it is lower priority. Now say I attempt to changetemplate1
so that it has a priority of 100. This request will correctly fail since if we made this change my data stream would now matchtemplate2
, which is an invalid state. But the response will also list all existing system data streams as part of the problem. The reason is that system data streams do not have named templates, and the API is incorrectly reporting on all data streams that do not have named templates. This fix filters out system data streams from this check.Here is an example of the incorrect error message that we currently get (
.fleet-actions-results
ought to not be listed because it is a system data stream):