Skip to content

Commit 5e32ec6

Browse files
committed
ES-9508 Index version deprecation notices
1 parent 25eb9bb commit 5e32ec6

File tree

2 files changed

+14
-20
lines changed

2 files changed

+14
-20
lines changed

x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecker.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ private DeprecationIssue oldIndicesCheck(
101101
return new DeprecationIssue(
102102
DeprecationIssue.Level.CRITICAL,
103103
"One or more Transforms write to this index with a compatibility version < 9.0",
104-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html"
105-
+ "#breaking_90_transform_destination_index",
104+
"https://ela.st/es-deprecation-9-transform-destination-index",
106105
Strings.format(
107106
"This index was created in version [%s] and requires action before upgrading to 9.0. The following transforms are "
108107
+ "configured to write to this index: [%s]. Refer to the migration guide to learn more about how to prepare "
@@ -117,7 +116,7 @@ private DeprecationIssue oldIndicesCheck(
117116
return new DeprecationIssue(
118117
DeprecationIssue.Level.CRITICAL,
119118
"Old index with a compatibility version < 9.0",
120-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html",
119+
"https://ela.st/es-deprecation-9-index-version",
121120
"This index has version: " + currentCompatibilityVersion.toReleaseVersion(),
122121
false,
123122
Map.of("reindex_required", true)
@@ -144,8 +143,7 @@ private DeprecationIssue ignoredOldIndicesCheck(
144143
return new DeprecationIssue(
145144
DeprecationIssue.Level.WARNING,
146145
"One or more Transforms write to this old index with a compatibility version < 9.0",
147-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html"
148-
+ "#breaking_90_transform_destination_index",
146+
"https://ela.st/es-deprecation-9-transform-destination-index",
149147
Strings.format(
150148
"This index was created in version [%s] and will be supported as a read-only index in 9.0. The following "
151149
+ "transforms are no longer able to write to this index: [%s]. Refer to the migration guide to learn more "
@@ -160,7 +158,7 @@ private DeprecationIssue ignoredOldIndicesCheck(
160158
return new DeprecationIssue(
161159
DeprecationIssue.Level.WARNING,
162160
"Old index with a compatibility version < 9.0 has been ignored",
163-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html",
161+
"https://ela.st/es-deprecation-9-index-version",
164162
"This read-only index has version: "
165163
+ currentCompatibilityVersion.toReleaseVersion()
166164
+ " and will be supported as read-only in 9.0",

x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationCheckerTests.java

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void testOldIndicesCheck() {
7979
DeprecationIssue expected = new DeprecationIssue(
8080
DeprecationIssue.Level.CRITICAL,
8181
"Old index with a compatibility version < 9.0",
82-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html",
82+
"https://ela.st/es-deprecation-9-index-version",
8383
"This index has version: " + OLD_VERSION.toReleaseVersion(),
8484
false,
8585
singletonMap("reindex_required", true)
@@ -103,7 +103,7 @@ public void testOldTransformIndicesCheck() {
103103
var expected = new DeprecationIssue(
104104
DeprecationIssue.Level.CRITICAL,
105105
"One or more Transforms write to this index with a compatibility version < 9.0",
106-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index",
106+
"https://ela.st/es-deprecation-9-transform-destination-index",
107107
"This index was created in version ["
108108
+ OLD_VERSION.toReleaseVersion()
109109
+ "] and requires action before upgrading to 9.0. "
@@ -129,7 +129,7 @@ public void testOldIndicesCheckWithMultipleTransforms() {
129129
var expected = new DeprecationIssue(
130130
DeprecationIssue.Level.CRITICAL,
131131
"One or more Transforms write to this index with a compatibility version < 9.0",
132-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index",
132+
"https://ela.st/es-deprecation-9-transform-destination-index",
133133
"This index was created in version ["
134134
+ OLD_VERSION.toReleaseVersion()
135135
+ "] and requires action before upgrading to 9.0. "
@@ -159,8 +159,7 @@ public void testMultipleOldIndicesCheckWithTransforms() {
159159
new DeprecationIssue(
160160
DeprecationIssue.Level.CRITICAL,
161161
"One or more Transforms write to this index with a compatibility version < 9.0",
162-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html"
163-
+ "#breaking_90_transform_destination_index",
162+
"https://ela.st/es-deprecation-9-transform-destination-index",
164163
"This index was created in version ["
165164
+ OLD_VERSION.toReleaseVersion()
166165
+ "] and requires action before upgrading to 9.0. "
@@ -175,8 +174,7 @@ public void testMultipleOldIndicesCheckWithTransforms() {
175174
new DeprecationIssue(
176175
DeprecationIssue.Level.CRITICAL,
177176
"One or more Transforms write to this index with a compatibility version < 9.0",
178-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html"
179-
+ "#breaking_90_transform_destination_index",
177+
"https://ela.st/es-deprecation-9-transform-destination-index",
180178
"This index was created in version ["
181179
+ OLD_VERSION.toReleaseVersion()
182180
+ "] and requires action before upgrading to 9.0. "
@@ -282,7 +280,7 @@ public void testOldIndicesIgnoredWarningCheck() {
282280
DeprecationIssue expected = new DeprecationIssue(
283281
DeprecationIssue.Level.WARNING,
284282
"Old index with a compatibility version < 9.0 has been ignored",
285-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html",
283+
"https://ela.st/es-deprecation-9-index-version",
286284
"This read-only index has version: " + OLD_VERSION.toReleaseVersion() + " and will be supported as read-only in 9.0",
287285
false,
288286
singletonMap("reindex_required", true)
@@ -333,7 +331,7 @@ public void testOldTransformIndicesIgnoredCheck() {
333331
var expected = new DeprecationIssue(
334332
DeprecationIssue.Level.WARNING,
335333
"One or more Transforms write to this old index with a compatibility version < 9.0",
336-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index",
334+
"https://ela.st/es-deprecation-9-transform-destination-index",
337335
"This index was created in version ["
338336
+ OLD_VERSION.toReleaseVersion()
339337
+ "] and will be supported as a read-only index in 9.0. "
@@ -359,7 +357,7 @@ public void testOldIndicesIgnoredCheckWithMultipleTransforms() {
359357
var expected = new DeprecationIssue(
360358
DeprecationIssue.Level.WARNING,
361359
"One or more Transforms write to this old index with a compatibility version < 9.0",
362-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index",
360+
"https://ela.st/es-deprecation-9-transform-destination-index",
363361
"This index was created in version ["
364362
+ OLD_VERSION.toReleaseVersion()
365363
+ "] and will be supported as a read-only index in 9.0. "
@@ -389,8 +387,7 @@ public void testMultipleOldIndicesIgnoredCheckWithTransforms() {
389387
new DeprecationIssue(
390388
DeprecationIssue.Level.WARNING,
391389
"One or more Transforms write to this old index with a compatibility version < 9.0",
392-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html"
393-
+ "#breaking_90_transform_destination_index",
390+
"https://ela.st/es-deprecation-9-transform-destination-index",
394391
"This index was created in version ["
395392
+ OLD_VERSION.toReleaseVersion()
396393
+ "] and will be supported as a read-only index in 9.0. "
@@ -405,8 +402,7 @@ public void testMultipleOldIndicesIgnoredCheckWithTransforms() {
405402
new DeprecationIssue(
406403
DeprecationIssue.Level.WARNING,
407404
"One or more Transforms write to this old index with a compatibility version < 9.0",
408-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html"
409-
+ "#breaking_90_transform_destination_index",
405+
"https://ela.st/es-deprecation-9-transform-destination-index",
410406
"This index was created in version ["
411407
+ OLD_VERSION.toReleaseVersion()
412408
+ "] and will be supported as a read-only index in 9.0. "

0 commit comments

Comments
 (0)