Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,14 @@ public List<DeprecationIssue> checkForDeprecations(NamedXContentRegistry namedXC

List<DeprecationIssue> deprecations = new ArrayList<>();

// V_8_0_0 deprecate beta transforms
if (getVersion() == null || getVersion().before(Version.V_7_15_0)) {
// deprecate beta transforms
if (getVersion() == null || getVersion().before(Version.V_7_5_0)) {
deprecations.add(
new DeprecationIssue(
Level.CRITICAL, // change to WARNING for 7.x
Level.CRITICAL,
"Transform [" + id + "] is too old",
TransformDeprecations.BREAKING_CHANGES_BASE_URL,
"The configuration uses an old format, you can use [_update] or [_upgrade] to update to configuration",
"The configuration uses an old format, you can use [_update] or [_upgrade] to update",
false,
null
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,28 @@ public void testCheckForDeprecations() {
)
);

deprecatedConfig = randomTransformConfigWithDeprecatedFields(id, Version.V_7_10_0);

// check _and_ clear warnings
assertWarnings("[max_page_search_size] is deprecated inside pivot please use settings instead");

// important: checkForDeprecations does _not_ create new deprecation warnings
assertThat(
deprecatedConfig.checkForDeprecations(xContentRegistry()),
equalTo(
org.elasticsearch.core.List.of(
new DeprecationIssue(
Level.WARNING,
"Transform [" + id + "] uses deprecated max_page_search_size",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html",
"[max_page_search_size] is deprecated inside pivot please use settings instead",
false,
null
)
)
)
);

deprecatedConfig = randomTransformConfigWithDeprecatedFields(id, Version.V_7_4_0);

// check _and_ clear warnings
Expand All @@ -738,7 +760,7 @@ public void testCheckForDeprecations() {
Level.CRITICAL,
"Transform [" + id + "] is too old",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html",
"The configuration uses an old format, you can use [_update] or [_upgrade] to update to configuration",
"The configuration uses an old format, you can use [_update] or [_upgrade] to update",
false,
null
),
Expand Down