Skip to content

Commit

Permalink
fixing deprecation info API URLs (#77523)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
masseyke authored Sep 15, 2021
1 parent 3696d56 commit 1561f68
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ static DeprecationIssue checkUserAgentPipelines(ClusterState state) {
if (pipelinesWithDeprecatedEcsConfig.isEmpty() == false) {
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
"User-Agent ingest plugin will always use ECS-formatted output",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html" +
"#ingest-user-agent-ecs-always",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/user-agent-processor.html#user-agent-processor",
"Ingest pipelines " + pipelinesWithDeprecatedEcsConfig +
" uses the [ecs] option which needs to be removed to work in 8.0", false, null);
}
Expand Down Expand Up @@ -134,7 +133,7 @@ static DeprecationIssue checkTemplatesWithFieldNamesDisabled(ClusterState state)

if (templatesContainingFieldNames.isEmpty() == false) {
return new DeprecationIssue(DeprecationIssue.Level.WARNING, "Index templates contain _field_names settings.",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html#fieldnames-enabling",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/mapping-field-names-field.html#disable-field-names",
"Index templates " + templatesContainingFieldNames + " use the deprecated `enable` setting for the `"
+ FieldNamesFieldMapper.NAME + "` field. Using this setting in new index mappings will throw an error "
+ "in the next major version and needs to be removed from existing mappings and templates.",
Expand Down Expand Up @@ -195,7 +194,7 @@ static DeprecationIssue checkTemplatesWithMultipleTypes(ClusterState state) {
}
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
"Some index templates contain multiple mapping types",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/removal-of-types.html",
"Index templates " + templatesWithMultipleTypes
+ " define multiple types and so will cause errors when used in index creation",
false,
Expand All @@ -205,7 +204,7 @@ static DeprecationIssue checkTemplatesWithMultipleTypes(ClusterState state) {
static DeprecationIssue checkClusterRoutingAllocationIncludeRelocationsSetting(final ClusterState clusterState) {
return checkRemovedSetting(clusterState.metadata().settings(),
CLUSTER_ROUTING_ALLOCATION_INCLUDE_RELOCATIONS_SETTING,
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_allocation_changes",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/modules-cluster.html#disk-based-shard-allocation",
DeprecationIssue.Level.WARNING
);
}
Expand Down Expand Up @@ -274,7 +273,8 @@ static DeprecationIssue checkGeoShapeTemplates(final ClusterState clusterState)
String detailsForIndexTemplates = getDetailsMessageForGeoShapeIndexTemplates(clusterState.getMetadata().getTemplates());
boolean deprecationInComponentTemplates = Strings.isEmpty(detailsForComponentTemplates) == false;
boolean deprecationInIndexTemplates = Strings.isEmpty(detailsForIndexTemplates) == false;
String url = "https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_mappings_changes";
String url = "https://www.elastic.co/guide/en/elasticsearch/reference/6.6/breaking-changes-6.6.html" +
"#_deprecated_literal_geo_shape_literal_parameters";
if (deprecationInComponentTemplates && deprecationInIndexTemplates) {
String message = "component templates and index templates contain deprecated geo_shape properties that must be removed";
String details = detailsForComponentTemplates + "; " + detailsForIndexTemplates;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ static DeprecationIssue chainedMultiFieldsCheck(IndexMetadata indexMetadata) {
if (issues.size() > 0) {
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
"Multi-fields within multi-fields",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html" +
"https://www.elastic.co/guide/en/elasticsearch/reference/7.x/breaking-changes-7.3.html" +
"#_defining_multi_fields_within_multi_fields",
"The names of fields that contain chained multi-fields: " + issues, false, null);
}
Expand Down Expand Up @@ -209,8 +209,7 @@ static DeprecationIssue fieldNamesDisabledCheck(IndexMetadata indexMetadata) {
if ((mapping != null) && ClusterDeprecationChecks.mapContainsFieldNamesDisabled(mapping.getSourceAsMap())) {
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
"Index mapping contains explicit `_field_names` enabling settings.",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html" +
"#fieldnames-enabling",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/mapping-field-names-field.html#disable-field-names",
"The index mapping contains a deprecated `enabled` setting for `_field_names` that should be removed moving foward.",
false, null);
}
Expand Down Expand Up @@ -271,7 +270,8 @@ static DeprecationIssue translogRetentionSettingCheck(IndexMetadata indexMetadat
|| IndexSettings.INDEX_TRANSLOG_RETENTION_AGE_SETTING.exists(indexMetadata.getSettings())) {
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
"translog retention settings are ignored",
"https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-translog.html",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/index-modules-translog.html" +
"#index-modules-translog-retention",
"translog retention settings [index.translog.retention.size] and [index.translog.retention.age] are ignored " +
"because translog is no longer used in peer recoveries with soft-deletes enabled (default in 7.0 or later)",
false, null);
Expand Down Expand Up @@ -303,8 +303,8 @@ private static DeprecationIssue slowLogSettingCheck(IndexMetadata indexMetadata,
if (setting.exists(indexMetadata.getSettings())) {
final String message = String.format(Locale.ROOT,
"setting [%s] is deprecated and will be removed in a future version", setting.getKey());
final String url = "https://www.elastic.co/guide/en/elasticsearch/reference/7.13/migrating-7.13.html" +
"#slow-log-level-removal";
final String url = "https://www.elastic.co/guide/en/elasticsearch/reference/7.15/migrating-7.13.html" +
"#breaking_713_infra_core_deprecations";

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

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

static DeprecationIssue checkIndexRoutingExcludeSetting(IndexMetadata indexMetadata) {
return checkRemovedSetting(indexMetadata.getSettings(),
INDEX_ROUTING_EXCLUDE_SETTING,
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_settings_changes",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.14/data-tier-shard-filtering.html#data-tier-allocation-filters",
DeprecationIssue.Level.CRITICAL
);
}
Expand Down Expand Up @@ -399,7 +399,8 @@ static DeprecationIssue checkGeoShapeMappings(IndexMetadata indexMetadata) {
String details = String.format(Locale.ROOT,
"The following geo_shape parameters must be removed from %s: [%s]", indexMetadata.getIndex().getName(),
messages.stream().collect(Collectors.joining("; ")));
String url = "https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_mappings_changes";
String url = "https://www.elastic.co/guide/en/elasticsearch/reference/6.6/breaking-changes-6.6.html" +
"#_deprecated_literal_geo_shape_literal_parameters";
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL, message, url, details, false, null);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static DeprecationIssue checkImplicitlyDisabledBasicRealms(final Settings settin
return new DeprecationIssue(
DeprecationIssue.Level.WARNING,
"File and/or native realms are enabled by default in next major release.",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.13/deprecated-7.13.html#implicitly-disabled-basic-realms",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/migrating-7.13.html#breaking_713_security_changes",
details,
false,
null
Expand All @@ -245,7 +245,7 @@ static DeprecationIssue checkReservedPrefixedRealmNames(final Settings settings,
return new DeprecationIssue(
DeprecationIssue.Level.WARNING,
"Realm names cannot start with [" + RESERVED_REALM_NAME_PREFIX + "] in a future major release.",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.14/deprecated-7.14.html#reserved-prefixed-realm-names",
"https://www.elastic.co/guide/en/elastic-stack/7.14/elasticsearch-breaking-changes.html#breaking_714_security_changes",
String.format(Locale.ROOT, "Found realm " + (reservedPrefixedRealmIdentifiers.size() == 1 ? "name" : "names")
+ " with reserved prefix [%s]: [%s]. "
+ "In a future major release, node will fail to start if any realm names start with reserved prefix.",
Expand Down Expand Up @@ -507,7 +507,7 @@ static DeprecationIssue checkMultipleDataPaths(Settings nodeSettings, PluginsAnd
if (dataPaths.size() > 1) {
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
"multiple [path.data] entries are deprecated, use a single data directory",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html#breaking_80_packaging_changes",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/modules-node.html#max-local-storage-nodes",
"Multiple data paths are deprecated. Instead, use RAID or other system level features to utilize multiple disks.",
false, null);
}
Expand All @@ -519,7 +519,7 @@ static DeprecationIssue checkDataPathsList(Settings nodeSettings, PluginsAndModu
if (Environment.dataPathUsesList(nodeSettings)) {
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
"[path.data] in a list is deprecated, use a string value",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-8.0.html#breaking_80_packaging_changes",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/modules-node.html#max-local-storage-nodes",
"Configuring [path.data] with a list is deprecated. Instead specify as a string value.", false, null);
}
return null;
Expand All @@ -545,8 +545,7 @@ static DeprecationIssue checkSingleDataNodeWatermarkSetting(final Settings setti
String key = DiskThresholdDecider.ENABLE_FOR_SINGLE_DATA_NODE.getKey();
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
String.format(Locale.ROOT, "setting [%s=false] is deprecated and will not be available in a future version", key),
"https://www.elastic.co/guide/en/elasticsearch/reference/7.14/" +
"breaking-changes-7.14.html#deprecate-single-data-node-watermark",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/modules-cluster.html#disk-based-shard-allocation",
String.format(Locale.ROOT, "found [%s] configured to false. Discontinue use of this setting or set it to true.", key),
false, null
);
Expand All @@ -559,8 +558,7 @@ static DeprecationIssue checkSingleDataNodeWatermarkSetting(final Settings setti
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
String.format(Locale.ROOT, "the default value [false] of setting [%s] is deprecated and will be changed to true" +
" in a future version. This cluster has only one data node and behavior will therefore change when upgrading", key),
"https://www.elastic.co/guide/en/elasticsearch/reference/7.14/" +
"breaking-changes-7.14.html#deprecate-single-data-node-watermark",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/modules-cluster.html#disk-based-shard-allocation",
String.format(Locale.ROOT, "found [%s] defaulting to false on a single data node cluster." +
" Set it to true to avoid this warning." +
" Consider using [%s] to disable disk based allocation", key,
Expand Down Expand Up @@ -613,7 +611,7 @@ static DeprecationIssue checkJoinTimeoutSetting(final Settings settings,
final XPackLicenseState licenseState) {
return checkRemovedSetting(settings,
JoinHelper.JOIN_TIMEOUT_SETTING,
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_cluster_changes",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-discovery-settings.html",
DeprecationIssue.Level.CRITICAL
);
}
Expand Down Expand Up @@ -668,7 +666,7 @@ static DeprecationIssue checkClusterRoutingAllocationIncludeRelocationsSetting(f
final XPackLicenseState licenseState) {
return checkRemovedSetting(settings,
CLUSTER_ROUTING_ALLOCATION_INCLUDE_RELOCATIONS_SETTING,
"https://www.elastic.co/guide/en/elasticsearch/reference/master/migrating-8.0.html#breaking_80_allocation_changes",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.15/modules-cluster.html#disk-based-shard-allocation",
DeprecationIssue.Level.CRITICAL
);
}
Expand Down Expand Up @@ -851,8 +849,7 @@ static DeprecationIssue checkTransportClientProfilesFilterSetting(
transportProfilesSettings
);

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

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

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

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

0 comments on commit 1561f68

Please sign in to comment.