Skip to content

Commit 062a8ab

Browse files
committed
Change to a more descriptive details message
1 parent 99a66aa commit 062a8ab

File tree

2 files changed

+48
-20
lines changed

2 files changed

+48
-20
lines changed

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,11 @@ private DeprecationIssue oldIndicesCheck(
104104
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-9.0.html"
105105
+ "#breaking_90_transform_destination_index",
106106
Strings.format(
107-
"Transforms [%s] write to this index with version [%s].",
108-
String.join(", ", transforms),
109-
currentCompatibilityVersion.toReleaseVersion()
107+
"This index was created in version [%s] and will be supported as a read-only index in 9.0. The following "
108+
+ "transforms will not be able to write to this index: [%s]. Refer to the migration guide to learn more "
109+
+ "about how to handle your transforms destination indices.",
110+
currentCompatibilityVersion.toReleaseVersion(),
111+
String.join(", ", transforms)
110112
),
111113
false,
112114
Map.of("reindex_required", true, "transform_ids", transforms)
@@ -145,17 +147,19 @@ private DeprecationIssue ignoredOldIndicesCheck(
145147
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-9.0.html"
146148
+ "#breaking_90_transform_destination_index",
147149
Strings.format(
148-
"Transforms [%s] write to this index with version [%s] and cannot be supported as read-only in 9.0",
149-
String.join(", ", transforms),
150-
currentCompatibilityVersion.toReleaseVersion()
150+
"This index was created in version [%s] and will be supported as a read-only index in 9.0. The following "
151+
+ "transforms are no longer able to write to this index: [%s]. Refer to the migration guide to learn more "
152+
+ "about how to handle your transforms destination indices.",
153+
currentCompatibilityVersion.toReleaseVersion(),
154+
String.join(", ", transforms)
151155
),
152156
false,
153157
Map.of("reindex_required", true, "transform_ids", transforms)
154158
);
155159
} else {
156160
return new DeprecationIssue(
157161
DeprecationIssue.Level.WARNING,
158-
"Old index with a compatibility version < 9.0 Has Been Ignored",
162+
"Old index with a compatibility version < 9.0 has been ignored",
159163
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-9.0.html",
160164
"This read-only index has version: "
161165
+ currentCompatibilityVersion.toReleaseVersion()

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

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ public void testOldTransformIndicesCheck() {
105105
"One or more Transforms write to this index with a compatibility version < 9.0",
106106
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-9.0.html"
107107
+ "#breaking_90_transform_destination_index",
108-
"Transforms [test-transform] write to this index with version [" + OLD_VERSION.toReleaseVersion() + "].",
108+
"This index was created in version ["
109+
+ OLD_VERSION.toReleaseVersion()
110+
+ "] and will be supported as a read-only index in 9.0. "
111+
+ "The following transforms will not be able to write to this index: [test-transform]. Refer to the "
112+
+ "migration guide to learn more about how to handle your transforms destination indices.",
109113
false,
110114
Map.of("reindex_required", true, "transform_ids", List.of("test-transform"))
111115
);
@@ -128,7 +132,11 @@ public void testOldIndicesCheckWithMultipleTransforms() {
128132
"One or more Transforms write to this index with a compatibility version < 9.0",
129133
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-9.0.html"
130134
+ "#breaking_90_transform_destination_index",
131-
"Transforms [test-transform1, test-transform2] write to this index with version [" + OLD_VERSION.toReleaseVersion() + "].",
135+
"This index was created in version ["
136+
+ OLD_VERSION.toReleaseVersion()
137+
+ "] and will be supported as a read-only index in 9.0. "
138+
+ "The following transforms will not be able to write to this index: [test-transform1, test-transform2]. Refer to the "
139+
+ "migration guide to learn more about how to handle your transforms destination indices.",
132140
false,
133141
Map.of("reindex_required", true, "transform_ids", List.of("test-transform1", "test-transform2"))
134142
);
@@ -155,7 +163,11 @@ public void testMultipleOldIndicesCheckWithTransforms() {
155163
"One or more Transforms write to this index with a compatibility version < 9.0",
156164
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-9.0.html"
157165
+ "#breaking_90_transform_destination_index",
158-
"Transforms [test-transform1] write to this index with version [" + OLD_VERSION.toReleaseVersion() + "].",
166+
"This index was created in version ["
167+
+ OLD_VERSION.toReleaseVersion()
168+
+ "] and will be supported as a read-only index in 9.0. "
169+
+ "The following transforms will not be able to write to this index: [test-transform1]. Refer to the "
170+
+ "migration guide to learn more about how to handle your transforms destination indices.",
159171
false,
160172
Map.of("reindex_required", true, "transform_ids", List.of("test-transform1"))
161173
)
@@ -167,7 +179,11 @@ public void testMultipleOldIndicesCheckWithTransforms() {
167179
"One or more Transforms write to this index with a compatibility version < 9.0",
168180
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-9.0.html"
169181
+ "#breaking_90_transform_destination_index",
170-
"Transforms [test-transform2] write to this index with version [" + OLD_VERSION.toReleaseVersion() + "].",
182+
"This index was created in version ["
183+
+ OLD_VERSION.toReleaseVersion()
184+
+ "] and will be supported as a read-only index in 9.0. "
185+
+ "The following transforms will not be able to write to this index: [test-transform2]. Refer to the "
186+
+ "migration guide to learn more about how to handle your transforms destination indices.",
171187
false,
172188
Map.of("reindex_required", true, "transform_ids", List.of("test-transform2"))
173189
)
@@ -267,7 +283,7 @@ public void testOldIndicesIgnoredWarningCheck() {
267283
.build();
268284
DeprecationIssue expected = new DeprecationIssue(
269285
DeprecationIssue.Level.WARNING,
270-
"Old index with a compatibility version < 9.0 Has Been Ignored",
286+
"Old index with a compatibility version < 9.0 has been ignored",
271287
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-9.0.html",
272288
"This read-only index has version: " + OLD_VERSION.toReleaseVersion() + " and will be supported as read-only in 9.0",
273289
false,
@@ -299,9 +315,11 @@ public void testOldTransformIndicesIgnoredCheck() {
299315
"One or more Transforms write to this old index with a compatibility version < 9.0",
300316
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-9.0.html"
301317
+ "#breaking_90_transform_destination_index",
302-
"Transforms [test-transform] write to this index with version ["
318+
"This index was created in version ["
303319
+ OLD_VERSION.toReleaseVersion()
304-
+ "] and cannot be supported as read-only in 9.0",
320+
+ "] and will be supported as a read-only index in 9.0. "
321+
+ "The following transforms are no longer able to write to this index: [test-transform]. Refer to the "
322+
+ "migration guide to learn more about how to handle your transforms destination indices.",
305323
false,
306324
Map.of("reindex_required", true, "transform_ids", List.of("test-transform"))
307325
);
@@ -324,9 +342,11 @@ public void testOldIndicesIgnoredCheckWithMultipleTransforms() {
324342
"One or more Transforms write to this old index with a compatibility version < 9.0",
325343
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-9.0.html"
326344
+ "#breaking_90_transform_destination_index",
327-
"Transforms [test-transform1, test-transform2] write to this index with version ["
345+
"This index was created in version ["
328346
+ OLD_VERSION.toReleaseVersion()
329-
+ "] and cannot be supported as read-only in 9.0",
347+
+ "] and will be supported as a read-only index in 9.0. "
348+
+ "The following transforms are no longer able to write to this index: [test-transform1, test-transform2]. Refer to the "
349+
+ "migration guide to learn more about how to handle your transforms destination indices.",
330350
false,
331351
Map.of("reindex_required", true, "transform_ids", List.of("test-transform1", "test-transform2"))
332352
);
@@ -353,9 +373,11 @@ public void testMultipleOldIndicesIgnoredCheckWithTransforms() {
353373
"One or more Transforms write to this old index with a compatibility version < 9.0",
354374
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-9.0.html"
355375
+ "#breaking_90_transform_destination_index",
356-
"Transforms [test-transform1] write to this index with version ["
376+
"This index was created in version ["
357377
+ OLD_VERSION.toReleaseVersion()
358-
+ "] and cannot be supported as read-only in 9.0",
378+
+ "] and will be supported as a read-only index in 9.0. "
379+
+ "The following transforms are no longer able to write to this index: [test-transform1]. Refer to the "
380+
+ "migration guide to learn more about how to handle your transforms destination indices.",
359381
false,
360382
Map.of("reindex_required", true, "transform_ids", List.of("test-transform1"))
361383
)
@@ -367,9 +389,11 @@ public void testMultipleOldIndicesIgnoredCheckWithTransforms() {
367389
"One or more Transforms write to this old index with a compatibility version < 9.0",
368390
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-9.0.html"
369391
+ "#breaking_90_transform_destination_index",
370-
"Transforms [test-transform2] write to this index with version ["
392+
"This index was created in version ["
371393
+ OLD_VERSION.toReleaseVersion()
372-
+ "] and cannot be supported as read-only in 9.0",
394+
+ "] and will be supported as a read-only index in 9.0. "
395+
+ "The following transforms are no longer able to write to this index: [test-transform2]. Refer to the "
396+
+ "migration guide to learn more about how to handle your transforms destination indices.",
373397
false,
374398
Map.of("reindex_required", true, "transform_ids", List.of("test-transform2"))
375399
)

0 commit comments

Comments
 (0)