Browse Source

Allow warnings for template conflicts (#112145)

Fixes #112143
Kostas Krikellas 1 year ago
parent
commit
3c92797d0d

+ 12 - 4
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/index/91_metrics_no_subobjects.yml

@@ -1,11 +1,13 @@
 ---
 "Metrics object indexing":
   - requires:
-      test_runner_features: allowed_warnings_regex
+      test_runner_features: [ "allowed_warnings", "allowed_warnings_regex" ]
       cluster_features: ["gte_v8.3.0"]
       reason: added in 8.3.0
 
   - do:
+      allowed_warnings:
+        - "index template [test] has index patterns [test-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [test] will take precedence during new index creation"
       indices.put_index_template:
         name: test
         body:
@@ -66,11 +68,13 @@
 ---
 "Root without subobjects":
   - requires:
-      test_runner_features: allowed_warnings_regex
+      test_runner_features: [ "allowed_warnings", "allowed_warnings_regex" ]
       cluster_features: ["gte_v8.3.0"]
       reason: added in 8.3.0
 
   - do:
+      allowed_warnings:
+        - "index template [test] has index patterns [test-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [test] will take precedence during new index creation"
       indices.put_index_template:
         name: test
         body:
@@ -126,11 +130,13 @@
 ---
 "Metrics object indexing with synthetic source":
   - requires:
-      test_runner_features: allowed_warnings_regex
+      test_runner_features: [ "allowed_warnings", "allowed_warnings_regex" ]
       cluster_features: ["gte_v8.4.0"]
       reason: added in 8.4.0
 
   - do:
+      allowed_warnings:
+        - "index template [test] has index patterns [test-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [test] will take precedence during new index creation"
       indices.put_index_template:
         name: test
         body:
@@ -194,11 +200,13 @@
 ---
 "Root without subobjects with synthetic source":
   - requires:
-      test_runner_features: allowed_warnings_regex
+      test_runner_features: [ "allowed_warnings", "allowed_warnings_regex" ]
       cluster_features: ["gte_v8.4.0"]
       reason: added in 8.4.0
 
   - do:
+      allowed_warnings:
+        - "index template [test] has index patterns [test-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [test] will take precedence during new index creation"
       indices.put_index_template:
         name: test
         body:

+ 12 - 4
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/index/92_metrics_auto_subobjects.yml

@@ -1,11 +1,13 @@
 ---
 "Metrics object indexing":
   - requires:
-      test_runner_features: allowed_warnings_regex
+      test_runner_features: [ "allowed_warnings", "allowed_warnings_regex" ]
       cluster_features: ["mapper.subobjects_auto"]
       reason: requires supporting subobjects auto setting
 
   - do:
+      allowed_warnings:
+        - "index template [test] has index patterns [test-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [test] will take precedence during new index creation"
       indices.put_index_template:
         name: test
         body:
@@ -66,11 +68,13 @@
 ---
 "Root with metrics":
   - requires:
-      test_runner_features: allowed_warnings_regex
+      test_runner_features: [ "allowed_warnings", "allowed_warnings_regex" ]
       cluster_features: ["mapper.subobjects_auto"]
       reason: requires supporting subobjects auto setting
 
   - do:
+      allowed_warnings:
+        - "index template [test] has index patterns [test-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [test] will take precedence during new index creation"
       indices.put_index_template:
         name: test
         body:
@@ -126,11 +130,13 @@
 ---
 "Metrics object indexing with synthetic source":
   - requires:
-      test_runner_features: allowed_warnings_regex
+      test_runner_features: [ "allowed_warnings", "allowed_warnings_regex" ]
       cluster_features: ["mapper.subobjects_auto"]
       reason: added in 8.4.0
 
   - do:
+      allowed_warnings:
+        - "index template [test] has index patterns [test-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [test] will take precedence during new index creation"
       indices.put_index_template:
         name: test
         body:
@@ -194,11 +200,13 @@
 ---
 "Root without subobjects with synthetic source":
   - requires:
-      test_runner_features: allowed_warnings_regex
+      test_runner_features: [ "allowed_warnings", "allowed_warnings_regex" ]
       cluster_features: ["mapper.subobjects_auto"]
       reason: added in 8.4.0
 
   - do:
+      allowed_warnings:
+        - "index template [test] has index patterns [test-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [test] will take precedence during new index creation"
       indices.put_index_template:
         name: test
         body: