Skip to content

[8.0] Fix ComposableIndexTemplate equals when composed_of is null (#80864) #81132

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

Merged
merged 2 commits into from
Nov 30, 2021

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Nov 29, 2021

Backports the following commits to 8.0:

…80864)

when composed_of is null, the ComposableIndexTemplate will return an empty list. it will cause the input and output ComposableIndexTemplate not equals.

reproduce:
in ComposableIndexTemplateTests.randomInstance method, make `List<String> componentTemplates = null;`, there are the failed tests:
```
Tests with failures:
 - org.elasticsearch.cluster.metadata.MetadataIndexTemplateServiceTests.testAddIndexTemplateV2
 - org.elasticsearch.cluster.metadata.MetadataIndexTemplateServiceTests.testRemoveMultipleIndexTemplateV2Wildcards
 - org.elasticsearch.cluster.metadata.MetadataIndexTemplateServiceTests.testUpdateIndexTemplateV2
 - org.elasticsearch.cluster.metadata.MetadataIndexTemplateServiceTests.testRemoveMultipleIndexTemplateV2
```

the PR add a `componentTemplatesEquals` method to make null and empty list equals .
@dakrone dakrone added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) and removed v8.0.0 labels Nov 29, 2021
@dakrone
Copy link
Member Author

dakrone commented Nov 30, 2021

@elasticmachine update branch

@elasticsearchmachine elasticsearchmachine merged commit 1ee6f1e into elastic:8.0 Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants