Skip to content

Commit dda7f47

Browse files
authored
Fix broken documentation links in deprecation checks (#36854) (#36873)
1 parent 236adc8 commit dda7f47

File tree

6 files changed

+32
-28
lines changed

6 files changed

+32
-28
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ static DeprecationIssue checkShardLimit(ClusterState state) {
2121
if (nodeCount > 0 && currentOpenShards >= maxShardsInCluster) {
2222
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
2323
"Number of open shards exceeds cluster soft limit",
24-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html",
24+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
25+
"#_cluster_wide_shard_soft_limit",
2526
"There are [" + currentOpenShards + "] open shards in this cluster, but the cluster is limited to [" +
2627
shardsPerNode + "] per data node, for [" + maxShardsInCluster + "] maximum.");
2728
}

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ static DeprecationIssue delimitedPayloadFilterCheck(IndexMetaData indexMetaData)
9292
}
9393
if (issues.size() > 0) {
9494
return new DeprecationIssue(DeprecationIssue.Level.WARNING, "Use of 'delimited_payload_filter'.",
95-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_analysis_changes.html", issues.toString());
95+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
96+
"#_literal_delimited_payload_filter_literal_renaming", issues.toString());
9697
}
9798
return null;
9899
}
@@ -143,7 +144,7 @@ static DeprecationIssue classicSimilarityMappingCheck(IndexMetaData indexMetaDat
143144
if (issues.size() > 0) {
144145
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
145146
"Classic similarity has been removed",
146-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/" +
147+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
147148
"#_the_literal_classic_literal_similarity_has_been_removed",
148149
"Fields which use classic similarity: " + issues.toString());
149150
}
@@ -159,7 +160,7 @@ static DeprecationIssue classicSimilaritySettingsCheck(IndexMetaData indexMetaDa
159160
if (classicSimilarities.size() > 0) {
160161
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
161162
"Classic similarity has been removed",
162-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/" +
163+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
163164
"#_the_literal_classic_literal_similarity_has_been_removed",
164165
"Custom similarities defined using classic similarity: " + classicSimilarities.toString());
165166
}

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static DeprecationIssue httpEnabledSettingRemoved(List<NodeInfo> nodeInfos, List
3232
if (nodesFound.size() > 0) {
3333
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
3434
"HTTP Enabled setting removed",
35-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
35+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
3636
"#remove-http-enabled",
3737
"nodes with http.enabled set: " + nodesFound);
3838
}
@@ -47,7 +47,7 @@ static DeprecationIssue auditLogPrefixSettingsCheck(List<NodeInfo> nodeInfos, Li
4747
if (nodesFound.size() > 0) {
4848
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
4949
"Audit log node info settings renamed",
50-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
50+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
5151
"#audit-logfile-local-node-info",
5252
"nodes with audit log settings that have been renamed: " + nodesFound);
5353
}
@@ -62,7 +62,7 @@ static DeprecationIssue indexThreadPoolCheck(List<NodeInfo> nodeInfos, List<Node
6262
if (nodesFound.size() > 0) {
6363
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
6464
"Index thread pool removed in favor of combined write thread pool",
65-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
65+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
6666
"#_index_thread_pool",
6767
"nodes with index thread pool settings: " + nodesFound);
6868
}
@@ -76,7 +76,7 @@ static DeprecationIssue bulkThreadPoolCheck(List<NodeInfo> nodeInfos, List<NodeS
7676
if (nodesFound.size() > 0) {
7777
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
7878
"Bulk thread pool renamed to write thread pool",
79-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
79+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
8080
"#write-thread-pool-fallback",
8181
"nodes with bulk thread pool settings: " + nodesFound);
8282
}
@@ -91,7 +91,7 @@ static DeprecationIssue tribeNodeCheck(List<NodeInfo> nodeInfos, List<NodeStats>
9191
if (nodesFound.size() > 0) {
9292
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
9393
"Tribe Node removed in favor of Cross Cluster Search",
94-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
94+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
9595
"#_tribe_node_removed",
9696
"nodes with tribe node settings: " + nodesFound);
9797
}
@@ -106,7 +106,7 @@ static DeprecationIssue httpPipeliningCheck(List<NodeInfo> nodeInfos, List<NodeS
106106
if (nodesFound.size() > 0) {
107107
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
108108
"HTTP pipelining setting removed as pipelining is now mandatory",
109-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
109+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
110110
"#remove-http-pipelining-setting",
111111
"nodes with http.pipelining set: " + nodesFound);
112112
}
@@ -127,7 +127,7 @@ static DeprecationIssue discoveryConfigurationCheck(List<NodeInfo> nodeInfos, Li
127127
if (nodesFound.size() > 0) {
128128
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
129129
"Discovery configuration is required in production mode",
130-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
130+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
131131
"#_discovery_configuration_is_required_in_production",
132132
"nodes which do not have discovery configured: " + nodesFound);
133133
}
@@ -143,7 +143,7 @@ static DeprecationIssue azureRepositoryChanges(List<NodeInfo> nodeInfos, List<No
143143
if (nodesFound.size() > 0) {
144144
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
145145
"Azure Repository settings changed",
146-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
146+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
147147
"#_azure_repository_plugin",
148148
"nodes with repository-azure installed: " + nodesFound);
149149
}
@@ -159,7 +159,7 @@ static DeprecationIssue gcsRepositoryChanges(List<NodeInfo> nodeInfos, List<Node
159159
if (nodesFound.size() > 0) {
160160
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
161161
"GCS Repository settings changed",
162-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
162+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
163163
"#_google_cloud_storage_repository_plugin",
164164
"nodes with repository-gcs installed: " + nodesFound);
165165
}
@@ -175,7 +175,7 @@ static DeprecationIssue fileDiscoveryPluginRemoved(List<NodeInfo> nodeInfos, Lis
175175
if (nodesFound.size() > 0) {
176176
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
177177
"File-based discovery is no longer a plugin and uses a different path",
178-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
178+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
179179
"#_file_based_discovery_plugin",
180180
"nodes with discovery-file installed: " + nodesFound);
181181
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ public void testCheckShardLimit() {
6767
List<DeprecationIssue> issues = DeprecationChecks.filterChecks(CLUSTER_SETTINGS_CHECKS, c -> c.apply(state));
6868
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.WARNING,
6969
"Number of open shards exceeds cluster soft limit",
70-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html",
70+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
71+
"#_cluster_wide_shard_soft_limit",
7172
"There are [" + currentOpenShards + "] open shards in this cluster, but the cluster is limited to [" +
7273
shardsPerNode + "] per data node, for [" + maxShardsInCluster + "] maximum.");
7374
assertEquals(singletonList(expected), issues);

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public void testDelimitedPayloadFilterCheck() {
4949
.put("index.analysis.filter.my_delimited_payload_filter.encoding", "identity").build();
5050
IndexMetaData indexMetaData = IndexMetaData.builder("test").settings(settings).numberOfShards(1).numberOfReplicas(0).build();
5151
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.WARNING, "Use of 'delimited_payload_filter'.",
52-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_analysis_changes.html",
52+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
53+
"#_literal_delimited_payload_filter_literal_renaming",
5354
"[The filter [my_delimited_payload_filter] is of deprecated 'delimited_payload_filter' type. "
5455
+ "The filter type should be changed to 'delimited_payload'.]");
5556
List<DeprecationIssue> issues = DeprecationInfoAction.filterChecks(INDEX_SETTINGS_CHECKS, c -> c.apply(indexMetaData));
@@ -131,7 +132,7 @@ public void testClassicSimilarityMappingCheck() throws IOException {
131132
.build();
132133
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.WARNING,
133134
"Classic similarity has been removed",
134-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/" +
135+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
135136
"#_the_literal_classic_literal_similarity_has_been_removed",
136137
"Fields which use classic similarity: [[type: _doc, field: classic_sim_field]]");
137138
List<DeprecationIssue> issues = DeprecationChecks.filterChecks(INDEX_SETTINGS_CHECKS, c -> c.apply(index));
@@ -150,7 +151,7 @@ public void testClassicSimilaritySettingsCheck() {
150151

151152
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.WARNING,
152153
"Classic similarity has been removed",
153-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/" +
154+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
154155
"#_the_literal_classic_literal_similarity_has_been_removed",
155156
"Custom similarities defined using classic similarity: [my_classic_similarity]");
156157
List<DeprecationIssue> issues = DeprecationChecks.filterChecks(INDEX_SETTINGS_CHECKS, c -> c.apply(index));

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ null, null, null, null, new FsInfo(0L, null, paths), null, null, null,
6767
public void testHttpEnabledCheck() {
6868
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
6969
"HTTP Enabled setting removed",
70-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
70+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
7171
"#remove-http-enabled",
7272
"nodes with http.enabled set: [node_check]");
7373
assertSettingsAndIssue("http.enabled", Boolean.toString(randomBoolean()), expected);
@@ -76,7 +76,7 @@ public void testHttpEnabledCheck() {
7676
public void testAuditLoggingPrefixSettingsCheck() {
7777
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
7878
"Audit log node info settings renamed",
79-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
79+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
8080
"#audit-logfile-local-node-info",
8181
"nodes with audit log settings that have been renamed: [node_check]");
8282
assertSettingsAndIssue("xpack.security.audit.logfile.prefix.emit_node_host_address", Boolean.toString(randomBoolean()), expected);
@@ -87,7 +87,7 @@ public void testAuditLoggingPrefixSettingsCheck() {
8787
public void testIndexThreadPoolCheck() {
8888
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
8989
"Index thread pool removed in favor of combined write thread pool",
90-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
90+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
9191
"#_index_thread_pool",
9292
"nodes with index thread pool settings: [node_check]");
9393
assertSettingsAndIssue("thread_pool.index.size", Integer.toString(randomIntBetween(1, 20000)), expected);
@@ -97,7 +97,7 @@ public void testIndexThreadPoolCheck() {
9797
public void testBulkThreadPoolCheck() {
9898
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
9999
"Bulk thread pool renamed to write thread pool",
100-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
100+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
101101
"#write-thread-pool-fallback",
102102
"nodes with bulk thread pool settings: [node_check]");
103103
assertSettingsAndIssue("thread_pool.bulk.size", Integer.toString(randomIntBetween(1, 20000)), expected);
@@ -108,7 +108,7 @@ public void testTribeNodeCheck() {
108108
String tribeSetting = "tribe." + randomAlphaOfLengthBetween(1, 20) + ".cluster.name";
109109
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
110110
"Tribe Node removed in favor of Cross Cluster Search",
111-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
111+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
112112
"#_tribe_node_removed",
113113
"nodes with tribe node settings: [node_check]");
114114
assertSettingsAndIssue(tribeSetting, randomAlphaOfLength(5), expected);
@@ -117,7 +117,7 @@ public void testTribeNodeCheck() {
117117
public void testHttpPipeliningCheck() {
118118
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
119119
"HTTP pipelining setting removed as pipelining is now mandatory",
120-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
120+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
121121
"#remove-http-pipelining-setting",
122122
"nodes with http.pipelining set: [node_check]");
123123
assertSettingsAndIssue("http.pipelining", Boolean.toString(randomBoolean()), expected);
@@ -165,7 +165,7 @@ null, null, null, null, new FsInfo(0L, null, paths), null, null, null,
165165

166166
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
167167
"Discovery configuration is required in production mode",
168-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
168+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
169169
"#_discovery_configuration_is_required_in_production",
170170
"nodes which do not have discovery configured: [node_check]");
171171
List<DeprecationIssue> issues = DeprecationChecks.filterChecks(NODE_SETTINGS_CHECKS, c -> c.apply(nodeInfos, nodeStats));
@@ -183,7 +183,7 @@ public void testAzurePluginCheck() {
183183

184184
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.WARNING,
185185
"Azure Repository settings changed",
186-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
186+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
187187
"#_azure_repository_plugin",
188188
"nodes with repository-azure installed: [node_check]");
189189
assertSettingsAndIssue("foo", "bar", expected);
@@ -198,7 +198,7 @@ public void testGCSPluginCheck() {
198198

199199
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.WARNING,
200200
"GCS Repository settings changed",
201-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
201+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
202202
"#_google_cloud_storage_repository_plugin",
203203
"nodes with repository-gcs installed: [node_check]");
204204
assertSettingsAndIssue("foo", "bar", expected);
@@ -213,7 +213,7 @@ public void testFileDiscoveryPluginCheck() {
213213

214214
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.WARNING,
215215
"File-based discovery is no longer a plugin and uses a different path",
216-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
216+
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
217217
"#_file_based_discovery_plugin",
218218
"nodes with discovery-file installed: [node_check]");
219219
assertSettingsAndIssue("foo", "bar", expected);

0 commit comments

Comments
 (0)