File tree Expand file tree Collapse file tree 2 files changed +27
-5
lines changed
main/java/org/elasticsearch/xpack/core/transform/transforms
test/java/org/elasticsearch/xpack/core/transform/transforms Expand file tree Collapse file tree 2 files changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -371,14 +371,14 @@ public List<DeprecationIssue> checkForDeprecations(NamedXContentRegistry namedXC
371371
372372 List <DeprecationIssue > deprecations = new ArrayList <>();
373373
374- // V_8_0_0 deprecate beta transforms
375- if (getVersion () == null || getVersion ().before (Version .V_7_15_0 )) {
374+ // deprecate beta transforms
375+ if (getVersion () == null || getVersion ().before (Version .V_7_5_0 )) {
376376 deprecations .add (
377377 new DeprecationIssue (
378- Level .CRITICAL , // change to WARNING for 7.x
378+ Level .CRITICAL ,
379379 "Transform [" + id + "] is too old" ,
380380 TransformDeprecations .BREAKING_CHANGES_BASE_URL ,
381- "The configuration uses an old format, you can use [_update] or [_upgrade] to update to configuration " ,
381+ "The configuration uses an old format, you can use [_update] or [_upgrade] to update" ,
382382 false ,
383383 null
384384 )
Original file line number Diff line number Diff line change @@ -724,6 +724,28 @@ public void testCheckForDeprecations() {
724724 )
725725 );
726726
727+ deprecatedConfig = randomTransformConfigWithDeprecatedFields (id , Version .V_7_10_0 );
728+
729+ // check _and_ clear warnings
730+ assertWarnings ("[max_page_search_size] is deprecated inside pivot please use settings instead" );
731+
732+ // important: checkForDeprecations does _not_ create new deprecation warnings
733+ assertThat (
734+ deprecatedConfig .checkForDeprecations (xContentRegistry ()),
735+ equalTo (
736+ List .of (
737+ new DeprecationIssue (
738+ Level .WARNING ,
739+ "Transform [" + id + "] uses deprecated max_page_search_size" ,
740+ "https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html" ,
741+ "[max_page_search_size] is deprecated inside pivot please use settings instead" ,
742+ false ,
743+ null
744+ )
745+ )
746+ )
747+ );
748+
727749 deprecatedConfig = randomTransformConfigWithDeprecatedFields (id , Version .V_7_4_0 );
728750
729751 // check _and_ clear warnings
@@ -738,7 +760,7 @@ public void testCheckForDeprecations() {
738760 Level .CRITICAL ,
739761 "Transform [" + id + "] is too old" ,
740762 "https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html" ,
741- "The configuration uses an old format, you can use [_update] or [_upgrade] to update to configuration " ,
763+ "The configuration uses an old format, you can use [_update] or [_upgrade] to update" ,
742764 false ,
743765 null
744766 ),
You can’t perform that action at this time.
0 commit comments