Skip to content

Commit 1b187fe

Browse files
authored
Add anchor to doc link in old index check (#37724)
The check for old indices did not include an anchor to the specific part of the breaking changes list addressing the breaking change, unlike all the other deprecation warnings. This commit adds an anchor to that link.
1 parent 4f0a1fa commit 1b187fe

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ static DeprecationIssue oldIndicesCheck(IndexMetaData indexMetaData) {
117117
} else {
118118
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
119119
"Index created before 6.0",
120-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/" +
121-
"breaking-changes-7.0.html",
120+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
121+
"#_indices_created_before_7_0",
122122
"This index was created using version: " + createdWith);
123123
}
124124

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public void testOldIndicesCheck() {
3737
.build();
3838
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
3939
"Index created before 6.0",
40-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/" +
41-
"breaking-changes-7.0.html",
40+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
41+
"#_indices_created_before_7_0",
4242
"This index was created using version: " + createdWith);
4343
List<DeprecationIssue> issues = DeprecationChecks.filterChecks(INDEX_SETTINGS_CHECKS, c -> c.apply(indexMetaData));
4444
assertEquals(singletonList(expected), issues);
@@ -73,8 +73,8 @@ public void testMultipleTypesCheckWithDefaultMapping() throws IOException {
7373

7474
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
7575
"Index created before 6.0",
76-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/" +
77-
"breaking-changes-7.0.html",
76+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
77+
"#_indices_created_before_7_0",
7878
"This index was created using version: " + createdWith);
7979
List<DeprecationIssue> issues = DeprecationChecks.filterChecks(INDEX_SETTINGS_CHECKS, c -> c.apply(indexMetaData));
8080
assertEquals(singletonList(expected), issues);

0 commit comments

Comments
 (0)