Data stream support for migrations deprecations info API

This commit is contained in:
Dan Hermann 2020-07-02 11:16:22 -05:00 committed by GitHub
parent 751e84e4c8
commit c988afdc15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 1 deletions

View File

@ -196,7 +196,7 @@ public class DeprecationInfoAction extends ActionType<DeprecationInfoAction.Resp
mlSettingsIssues.addAll(filterChecks(mlSettingsCheck, (c) -> c.apply(config, xContentRegistry))); mlSettingsIssues.addAll(filterChecks(mlSettingsCheck, (c) -> c.apply(config, xContentRegistry)));
} }
String[] concreteIndexNames = indexNameExpressionResolver.concreteIndexNames(state, indicesOptions, indices); String[] concreteIndexNames = indexNameExpressionResolver.concreteIndexNames(state, indicesOptions, true, indices);
Map<String, List<DeprecationIssue>> indexSettingsIssues = new HashMap<>(); Map<String, List<DeprecationIssue>> indexSettingsIssues = new HashMap<>();
for (String concreteIndex : concreteIndexNames) { for (String concreteIndex : concreteIndexNames) {

View File

@ -297,3 +297,42 @@
name: simple-data-stream1 name: simple-data-stream1
- is_true: acknowledged - is_true: acknowledged
---
"Verify data stream resolvability in migrations API":
- skip:
version: " - 7.99.99"
reason: "change to 7.8.99 after backport"
features: allowed_warnings
- do:
allowed_warnings:
- "index template [my-template1] has index patterns [simple-data-stream1] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template1] will take precedence during new index creation"
indices.put_index_template:
name: my-template1
body:
index_patterns: [simple-data-stream1]
template:
mappings:
properties:
'@timestamp':
type: date
data_stream:
timestamp_field: '@timestamp'
- do:
indices.create_data_stream:
name: simple-data-stream1
- is_true: acknowledged
- do:
migration.deprecations:
index: "simple-data-stream1"
- length: { cluster_settings: 0 }
- length: { node_settings: 0 }
- length: { index_settings: 0 }
- length: { ml_settings: 0 }
- do:
indices.delete_data_stream:
name: simple-data-stream1
- is_true: acknowledged