-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Backport 2.x] Fix delete index template failed when the index templa…
…te matches a data stream but is unused (#15098) * Fix delete index template failed when the index template matches a data stream but is unused (#15080) * Fix delete not-using index template failed when the index pattern matches a data stream Signed-off-by: Gao Binlong <[email protected]> * modify change log Signed-off-by: Gao Binlong <[email protected]> * Fix version check Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> (cherry picked from commit a9d09aa) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Update 10_basic.yml to for 2.17.0 Signed-off-by: Andriy Redko <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: Andriy Redko <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Andriy Redko <[email protected]>
- Loading branch information
1 parent
883af54
commit 0df6e9e
Showing
4 changed files
with
112 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...api-spec/src/main/resources/rest-api-spec/test/indices.delete_index_template/10_basic.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
setup: | ||
- do: | ||
indices.put_index_template: | ||
name: test_template_1 | ||
body: | ||
index_patterns: test-* | ||
template: | ||
settings: | ||
number_of_shards: 1 | ||
number_of_replicas: 0 | ||
"priority": 50 | ||
|
||
- do: | ||
indices.put_index_template: | ||
name: test_template_2 | ||
body: | ||
index_patterns: test-* | ||
data_stream: {} | ||
template: | ||
settings: | ||
number_of_shards: 1 | ||
number_of_replicas: 0 | ||
"priority": 51 | ||
|
||
--- | ||
teardown: | ||
- do: | ||
indices.delete_data_stream: | ||
name: test-1 | ||
ignore: 404 | ||
- do: | ||
indices.delete_index_template: | ||
name: test_template_1 | ||
ignore: 404 | ||
- do: | ||
indices.delete_index_template: | ||
name: test_template_2 | ||
ignore: 404 | ||
|
||
--- | ||
"Delete index template which is not used by data stream but index pattern matches": | ||
- skip: | ||
version: " - 2.16.99" | ||
reason: "fixed in 2.17.0" | ||
|
||
- do: | ||
indices.create_data_stream: | ||
name: test-1 | ||
|
||
- do: | ||
indices.delete_index_template: | ||
name: test_template_1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters