Skip to content

Commit 1561f68

Browse files
authored
fixing deprecation info API URLs (#77523)
Many of the URLs for deprecation info messages were broken (returned 404s), or referenced "master" or "current", which are likely to break in the future. This commit updates all of the ones that can currently be fixed. Relates #42404
1 parent 3696d56 commit 1561f68

File tree

6 files changed

+67
-69
lines changed

6 files changed

+67
-69
lines changed

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ static DeprecationIssue checkUserAgentPipelines(ClusterState state) {
6969
if (pipelinesWithDeprecatedEcsConfig.isEmpty() == false) {
7070
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
7171
"User-Agent ingest plugin will always use ECS-formatted output",
72-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html" +
73-
"#ingest-user-agent-ecs-always",
72+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/user-agent-processor.html#user-agent-processor",
7473
"Ingest pipelines " + pipelinesWithDeprecatedEcsConfig +
7574
" uses the [ecs] option which needs to be removed to work in 8.0", false, null);
7675
}
@@ -134,7 +133,7 @@ static DeprecationIssue checkTemplatesWithFieldNamesDisabled(ClusterState state)
134133

135134
if (templatesContainingFieldNames.isEmpty() == false) {
136135
return new DeprecationIssue(DeprecationIssue.Level.WARNING, "Index templates contain _field_names settings.",
137-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html#fieldnames-enabling",
136+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/mapping-field-names-field.html#disable-field-names",
138137
"Index templates " + templatesContainingFieldNames + " use the deprecated `enable` setting for the `"
139138
+ FieldNamesFieldMapper.NAME + "` field. Using this setting in new index mappings will throw an error "
140139
+ "in the next major version and needs to be removed from existing mappings and templates.",
@@ -195,7 +194,7 @@ static DeprecationIssue checkTemplatesWithMultipleTypes(ClusterState state) {
195194
}
196195
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
197196
"Some index templates contain multiple mapping types",
198-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html",
197+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/removal-of-types.html",
199198
"Index templates " + templatesWithMultipleTypes
200199
+ " define multiple types and so will cause errors when used in index creation",
201200
false,
@@ -205,7 +204,7 @@ static DeprecationIssue checkTemplatesWithMultipleTypes(ClusterState state) {
205204
static DeprecationIssue checkClusterRoutingAllocationIncludeRelocationsSetting(final ClusterState clusterState) {
206205
return checkRemovedSetting(clusterState.metadata().settings(),
207206
CLUSTER_ROUTING_ALLOCATION_INCLUDE_RELOCATIONS_SETTING,
208-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_allocation_changes",
207+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/modules-cluster.html#disk-based-shard-allocation",
209208
DeprecationIssue.Level.WARNING
210209
);
211210
}
@@ -274,7 +273,8 @@ static DeprecationIssue checkGeoShapeTemplates(final ClusterState clusterState)
274273
String detailsForIndexTemplates = getDetailsMessageForGeoShapeIndexTemplates(clusterState.getMetadata().getTemplates());
275274
boolean deprecationInComponentTemplates = Strings.isEmpty(detailsForComponentTemplates) == false;
276275
boolean deprecationInIndexTemplates = Strings.isEmpty(detailsForIndexTemplates) == false;
277-
String url = "https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_mappings_changes";
276+
String url = "https://www.elastic.co/guide/en/elasticsearch/reference/6.6/breaking-changes-6.6.html" +
277+
"#_deprecated_literal_geo_shape_literal_parameters";
278278
if (deprecationInComponentTemplates && deprecationInIndexTemplates) {
279279
String message = "component templates and index templates contain deprecated geo_shape properties that must be removed";
280280
String details = detailsForComponentTemplates + "; " + detailsForIndexTemplates;

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

+12-11
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ static DeprecationIssue chainedMultiFieldsCheck(IndexMetadata indexMetadata) {
181181
if (issues.size() > 0) {
182182
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
183183
"Multi-fields within multi-fields",
184-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html" +
184+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.x/breaking-changes-7.3.html" +
185185
"#_defining_multi_fields_within_multi_fields",
186186
"The names of fields that contain chained multi-fields: " + issues, false, null);
187187
}
@@ -209,8 +209,7 @@ static DeprecationIssue fieldNamesDisabledCheck(IndexMetadata indexMetadata) {
209209
if ((mapping != null) && ClusterDeprecationChecks.mapContainsFieldNamesDisabled(mapping.getSourceAsMap())) {
210210
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
211211
"Index mapping contains explicit `_field_names` enabling settings.",
212-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html" +
213-
"#fieldnames-enabling",
212+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/mapping-field-names-field.html#disable-field-names",
214213
"The index mapping contains a deprecated `enabled` setting for `_field_names` that should be removed moving foward.",
215214
false, null);
216215
}
@@ -271,7 +270,8 @@ static DeprecationIssue translogRetentionSettingCheck(IndexMetadata indexMetadat
271270
|| IndexSettings.INDEX_TRANSLOG_RETENTION_AGE_SETTING.exists(indexMetadata.getSettings())) {
272271
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
273272
"translog retention settings are ignored",
274-
"https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-translog.html",
273+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/index-modules-translog.html" +
274+
"#index-modules-translog-retention",
275275
"translog retention settings [index.translog.retention.size] and [index.translog.retention.age] are ignored " +
276276
"because translog is no longer used in peer recoveries with soft-deletes enabled (default in 7.0 or later)",
277277
false, null);
@@ -303,8 +303,8 @@ private static DeprecationIssue slowLogSettingCheck(IndexMetadata indexMetadata,
303303
if (setting.exists(indexMetadata.getSettings())) {
304304
final String message = String.format(Locale.ROOT,
305305
"setting [%s] is deprecated and will be removed in a future version", setting.getKey());
306-
final String url = "https://www.elastic.co/guide/en/elasticsearch/reference/7.13/migrating-7.13.html" +
307-
"#slow-log-level-removal";
306+
final String url = "https://www.elastic.co/guide/en/elasticsearch/reference/7.15/migrating-7.13.html" +
307+
"#breaking_713_infra_core_deprecations";
308308

309309
final String details = String.format(Locale.ROOT, "Found [%s] configured. Discontinue use of this setting. Use thresholds.",
310310
setting.getKey());
@@ -318,7 +318,7 @@ static DeprecationIssue storeTypeSettingCheck(IndexMetadata indexMetadata) {
318318
if (IndexModule.Type.SIMPLEFS.match(storeType)) {
319319
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
320320
"[simplefs] is deprecated and will be removed in future versions",
321-
"https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-store.html",
321+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/index-modules-store.html#file-system",
322322
"[simplefs] is deprecated and will be removed in 8.0. Use [niofs] or other file systems instead. " +
323323
"Elasticsearch 7.15 or later uses [niofs] for the [simplefs] store type " +
324324
"as it offers superior or equivalent performance to [simplefs].", false, null);
@@ -345,23 +345,23 @@ static DeprecationIssue checkRemovedSetting(final Settings settings,
345345
static DeprecationIssue checkIndexRoutingRequireSetting(IndexMetadata indexMetadata) {
346346
return checkRemovedSetting(indexMetadata.getSettings(),
347347
INDEX_ROUTING_REQUIRE_SETTING,
348-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_settings_changes",
348+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.14/data-tier-shard-filtering.html#data-tier-allocation-filters",
349349
DeprecationIssue.Level.CRITICAL
350350
);
351351
}
352352

353353
static DeprecationIssue checkIndexRoutingIncludeSetting(IndexMetadata indexMetadata) {
354354
return checkRemovedSetting(indexMetadata.getSettings(),
355355
INDEX_ROUTING_INCLUDE_SETTING,
356-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_settings_changes",
356+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.14/data-tier-shard-filtering.html#data-tier-allocation-filters",
357357
DeprecationIssue.Level.CRITICAL
358358
);
359359
}
360360

361361
static DeprecationIssue checkIndexRoutingExcludeSetting(IndexMetadata indexMetadata) {
362362
return checkRemovedSetting(indexMetadata.getSettings(),
363363
INDEX_ROUTING_EXCLUDE_SETTING,
364-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_settings_changes",
364+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.14/data-tier-shard-filtering.html#data-tier-allocation-filters",
365365
DeprecationIssue.Level.CRITICAL
366366
);
367367
}
@@ -399,7 +399,8 @@ static DeprecationIssue checkGeoShapeMappings(IndexMetadata indexMetadata) {
399399
String details = String.format(Locale.ROOT,
400400
"The following geo_shape parameters must be removed from %s: [%s]", indexMetadata.getIndex().getName(),
401401
messages.stream().collect(Collectors.joining("; ")));
402-
String url = "https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_mappings_changes";
402+
String url = "https://www.elastic.co/guide/en/elasticsearch/reference/6.6/breaking-changes-6.6.html" +
403+
"#_deprecated_literal_geo_shape_literal_parameters";
403404
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL, message, url, details, false, null);
404405
}
405406
}

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

+12-16
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ static DeprecationIssue checkImplicitlyDisabledBasicRealms(final Settings settin
219219
return new DeprecationIssue(
220220
DeprecationIssue.Level.WARNING,
221221
"File and/or native realms are enabled by default in next major release.",
222-
"https://www.elastic.co/guide/en/elasticsearch/reference/7.13/deprecated-7.13.html#implicitly-disabled-basic-realms",
222+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/migrating-7.13.html#breaking_713_security_changes",
223223
details,
224224
false,
225225
null
@@ -245,7 +245,7 @@ static DeprecationIssue checkReservedPrefixedRealmNames(final Settings settings,
245245
return new DeprecationIssue(
246246
DeprecationIssue.Level.WARNING,
247247
"Realm names cannot start with [" + RESERVED_REALM_NAME_PREFIX + "] in a future major release.",
248-
"https://www.elastic.co/guide/en/elasticsearch/reference/7.14/deprecated-7.14.html#reserved-prefixed-realm-names",
248+
"https://www.elastic.co/guide/en/elastic-stack/7.14/elasticsearch-breaking-changes.html#breaking_714_security_changes",
249249
String.format(Locale.ROOT, "Found realm " + (reservedPrefixedRealmIdentifiers.size() == 1 ? "name" : "names")
250250
+ " with reserved prefix [%s]: [%s]. "
251251
+ "In a future major release, node will fail to start if any realm names start with reserved prefix.",
@@ -507,7 +507,7 @@ static DeprecationIssue checkMultipleDataPaths(Settings nodeSettings, PluginsAnd
507507
if (dataPaths.size() > 1) {
508508
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
509509
"multiple [path.data] entries are deprecated, use a single data directory",
510-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html#breaking_80_packaging_changes",
510+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/modules-node.html#max-local-storage-nodes",
511511
"Multiple data paths are deprecated. Instead, use RAID or other system level features to utilize multiple disks.",
512512
false, null);
513513
}
@@ -519,7 +519,7 @@ static DeprecationIssue checkDataPathsList(Settings nodeSettings, PluginsAndModu
519519
if (Environment.dataPathUsesList(nodeSettings)) {
520520
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
521521
"[path.data] in a list is deprecated, use a string value",
522-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html#breaking_80_packaging_changes",
522+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/modules-node.html#max-local-storage-nodes",
523523
"Configuring [path.data] with a list is deprecated. Instead specify as a string value.", false, null);
524524
}
525525
return null;
@@ -545,8 +545,7 @@ static DeprecationIssue checkSingleDataNodeWatermarkSetting(final Settings setti
545545
String key = DiskThresholdDecider.ENABLE_FOR_SINGLE_DATA_NODE.getKey();
546546
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
547547
String.format(Locale.ROOT, "setting [%s=false] is deprecated and will not be available in a future version", key),
548-
"https://www.elastic.co/guide/en/elasticsearch/reference/7.14/" +
549-
"breaking-changes-7.14.html#deprecate-single-data-node-watermark",
548+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/modules-cluster.html#disk-based-shard-allocation",
550549
String.format(Locale.ROOT, "found [%s] configured to false. Discontinue use of this setting or set it to true.", key),
551550
false, null
552551
);
@@ -559,8 +558,7 @@ static DeprecationIssue checkSingleDataNodeWatermarkSetting(final Settings setti
559558
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
560559
String.format(Locale.ROOT, "the default value [false] of setting [%s] is deprecated and will be changed to true" +
561560
" in a future version. This cluster has only one data node and behavior will therefore change when upgrading", key),
562-
"https://www.elastic.co/guide/en/elasticsearch/reference/7.14/" +
563-
"breaking-changes-7.14.html#deprecate-single-data-node-watermark",
561+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/modules-cluster.html#disk-based-shard-allocation",
564562
String.format(Locale.ROOT, "found [%s] defaulting to false on a single data node cluster." +
565563
" Set it to true to avoid this warning." +
566564
" Consider using [%s] to disable disk based allocation", key,
@@ -613,7 +611,7 @@ static DeprecationIssue checkJoinTimeoutSetting(final Settings settings,
613611
final XPackLicenseState licenseState) {
614612
return checkRemovedSetting(settings,
615613
JoinHelper.JOIN_TIMEOUT_SETTING,
616-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_cluster_changes",
614+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-discovery-settings.html",
617615
DeprecationIssue.Level.CRITICAL
618616
);
619617
}
@@ -668,7 +666,7 @@ static DeprecationIssue checkClusterRoutingAllocationIncludeRelocationsSetting(f
668666
final XPackLicenseState licenseState) {
669667
return checkRemovedSetting(settings,
670668
CLUSTER_ROUTING_ALLOCATION_INCLUDE_RELOCATIONS_SETTING,
671-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_allocation_changes",
669+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/modules-cluster.html#disk-based-shard-allocation",
672670
DeprecationIssue.Level.CRITICAL
673671
);
674672
}
@@ -851,8 +849,7 @@ static DeprecationIssue checkTransportClientProfilesFilterSetting(
851849
transportProfilesSettings
852850
);
853851

854-
final String url = "https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0" +
855-
".html#separating-node-and-client-traffic";
852+
final String url = "https://www.elastic.co/guide/en/elasticsearch/client/java-api/7.x/transport-client.html";
856853
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL, message, url, details, false, null);
857854
}
858855

@@ -882,7 +879,7 @@ static DeprecationIssue checkDelayClusterStateRecoverySettings(final Settings se
882879
"cannot use properties [%s] because they have been deprecated and will be removed in the next major version",
883880
settingNames
884881
);
885-
final String url = "https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_settings_changes";
882+
final String url = "https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-gateway.html";
886883
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL, message, url, details, false, null);
887884
}
888885

@@ -917,8 +914,7 @@ static DeprecationIssue checkFixedAutoQueueSizeThreadpool(final Settings setting
917914
" major version",
918915
settingNames
919916
);
920-
final String url = "https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0" +
921-
".html#breaking_80_threadpool_changes";
917+
final String url = "https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-threadpool.html";
922918
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL, message, url, details, false, null);
923919
}
924920

@@ -995,7 +991,7 @@ static DeprecationIssue checkMaxLocalStorageNodesSetting(final Settings settings
995991
final XPackLicenseState licenseState) {
996992
return checkRemovedSetting(settings,
997993
NodeEnvironment.MAX_LOCAL_STORAGE_NODES_SETTING,
998-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_node_changes",
994+
"https://www.elastic.co/guide/en/elasticsearch/reference/7.14/modules-node.html#max-local-storage-nodes",
999995
DeprecationIssue.Level.CRITICAL
1000996
);
1001997
}

0 commit comments

Comments
 (0)