Skip to content

Commit

Permalink
Updates to deprecation info API message wording (#80144)
Browse files Browse the repository at this point in the history
This commit includes more updates to deprecation info API message wording and URLs as a follow-up to #79387.
  • Loading branch information
masseyke committed Nov 3, 2021
1 parent ff0b01c commit beee262
Show file tree
Hide file tree
Showing 10 changed files with 127 additions and 129 deletions.
11 changes: 2 additions & 9 deletions server/src/main/java/org/elasticsearch/script/ScriptService.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,8 @@ public class ScriptService implements Closeable, ClusterStateApplier, ScriptComp
Property.NodeScope
);

public static final String USE_CONTEXT_RATE_KEY_DEPRECATION_MESSAGE = "["
+ USE_CONTEXT_RATE_KEY
+ "] is deprecated for the setting ["
+ SCRIPT_GENERAL_MAX_COMPILATIONS_RATE_SETTING.getKey()
+ "] as system scripts are now exempt from the rate limit. "
+ "Set to a value such as [150/5m] (a rate of 150 compilations per five minutes) to rate limit user scripts in case the "
+ "script cache ["
+ SCRIPT_GENERAL_CACHE_SIZE_SETTING.getKey()
+ "] is undersized causing script compilation thrashing.";
public static final String USE_CONTEXT_RATE_KEY_DEPRECATION_MESSAGE = "Setting [script.max_compilations_rate] to [use-context] is "
+ "deprecated";

// Per-context settings
static final String CONTEXT_PREFIX = "script.context.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,9 @@ public List<DeprecationIssue> checkForDeprecations(NamedXContentRegistry namedXC
deprecations.add(
new DeprecationIssue(
Level.CRITICAL,
"Transform [" + id + "] is too old",
"Transform [" + id + "] uses an obsolete configuration format",
TransformDeprecations.UPGRADE_TRANSFORM_URL,
TransformDeprecations.ACTION_UPGRADE_TRANSFORMS_API,
"Use [_update] or [_upgrade] to update the configuration of [" + id + "].",
false,
null
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,11 @@ public void checkForDeprecations(String id, NamedXContentRegistry namedXContentR
// max_page_search_size got deprecated in 7.8, still accepted for 8.x, to be removed in 9.x
new DeprecationIssue(
Level.WARNING,
"Transform [" + id + "] uses deprecated max_page_search_size",
TransformDeprecations.MAX_PAGE_SEARCH_SIZE_BREAKING_CHANGES_URL,
TransformDeprecations.ACTION_MAX_PAGE_SEARCH_SIZE_IS_DEPRECATED,
"Setting [max_page_search_size] in a pivot is deprecated",
"https://ela.st/es-deprecation-7-transform-max-page-search-size",
"Remove [max_page_search_size] from the pivot in ["
+ id
+ "]. Configure [max_page_search_size] in the transform settings.",
false,
null
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,9 +749,12 @@ public void testCheckForDeprecations() {
Collections.singletonList(
new DeprecationIssue(
Level.WARNING,
"Transform [" + id + "] uses deprecated max_page_search_size",
TransformDeprecations.MAX_PAGE_SEARCH_SIZE_BREAKING_CHANGES_URL,
TransformDeprecations.ACTION_MAX_PAGE_SEARCH_SIZE_IS_DEPRECATED,
"Setting [max_page_search_size] in a pivot is deprecated",
"https://ela.st/es-deprecation-7-transform-max-page-search-size",
"Remove [max_page_search_size] from the pivot in ["
+ id
+ "]. Configure [max_page_search_size] in the "
+ "transform settings.",
false,
null
)
Expand All @@ -771,9 +774,12 @@ public void testCheckForDeprecations() {
org.elasticsearch.core.List.of(
new DeprecationIssue(
Level.WARNING,
"Transform [" + id + "] uses deprecated max_page_search_size",
TransformDeprecations.MAX_PAGE_SEARCH_SIZE_BREAKING_CHANGES_URL,
TransformDeprecations.ACTION_MAX_PAGE_SEARCH_SIZE_IS_DEPRECATED,
"Setting [max_page_search_size] in a pivot is deprecated",
"https://ela.st/es-deprecation-7-transform-max-page-search-size",
"Remove [max_page_search_size] from the pivot in ["
+ id
+ "]. Configure [max_page_search_size] in the "
+ "transform settings.",
false,
null
)
Expand All @@ -793,17 +799,20 @@ public void testCheckForDeprecations() {
org.elasticsearch.core.List.of(
new DeprecationIssue(
Level.CRITICAL,
"Transform [" + id + "] is too old",
"Transform [" + id + "] uses an obsolete configuration format",
TransformDeprecations.UPGRADE_TRANSFORM_URL,
TransformDeprecations.ACTION_UPGRADE_TRANSFORMS_API,
"Use [_update] or [_upgrade] to update the configuration of [" + id + "].",
false,
null
),
new DeprecationIssue(
Level.WARNING,
"Transform [" + id + "] uses deprecated max_page_search_size",
TransformDeprecations.MAX_PAGE_SEARCH_SIZE_BREAKING_CHANGES_URL,
TransformDeprecations.ACTION_MAX_PAGE_SEARCH_SIZE_IS_DEPRECATED,
"Setting [max_page_search_size] in a pivot is deprecated",
"https://ela.st/es-deprecation-7-transform-max-page-search-size",
"Remove [max_page_search_size] from the pivot in ["
+ id
+ "]. Configure [max_page_search_size] in the "
+ "transform settings.",
false,
null
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ public void check(Components components, ActionListener<CheckResult> deprecation
private DeprecationIssue createDeprecationIssue(String localIndexName) {
return new DeprecationIssue(
DeprecationIssue.Level.WARNING,
"An auto followed index follows a remote system index",
"https://www.elastic.co/guide/en/elasticsearch/reference/7.13/migrating-7.14.html#breaking_714_ccr_changes",
"Auto followed index ["
"Automatically following system indices is deprecated",
"https://ela.st/es-deprecation-7-auto-follow-system-index",
"Index ["
+ localIndexName
+ "] follows a remote system index and this behaviour will change in the next major version.",
+ "] follows a remote system index. In 8.0.0, follower indices will not be created for remote "
+ "system indices "
+ "that match an auto-follow pattern.",
false,
null
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,11 +540,12 @@ static DeprecationIssue frozenIndexSettingCheck(IndexMetadata indexMetadata) {
String indexName = indexMetadata.getIndex().getName();
return new DeprecationIssue(
DeprecationIssue.Level.WARNING,
"index ["
"Freezing indices is deprecated",
"https://ela.st/es-deprecation-7-frozen-indices",
"Index ["
+ indexName
+ "] is a frozen index. The frozen indices feature is deprecated and will be removed in a future version",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/frozen-indices.html",
"Frozen indices no longer offer any advantages. Consider cold or frozen tiers in place of frozen indices.",
+ "] is frozen. Frozen indices no longer offer any advantages. Instead, unfreeze the index, make it"
+ " read-only, and move it to the cold or frozen tier.",
false,
null
);
Expand All @@ -559,13 +560,13 @@ static DeprecationIssue emptyDataTierPreferenceCheck(ClusterState clusterState,
String indexName = indexMetadata.getIndex().getName();
return new DeprecationIssue(
DeprecationIssue.Level.CRITICAL,
"index ["
"Index ["
+ indexName
+ "] does not have a ["
+ DataTier.TIER_PREFERENCE
+ "] setting, "
+ "in 8.0 this setting will be required for all indices and may not be empty or null.",
"https://www.elastic.co/guide/en/elasticsearch/reference/current/data-tiers.html",
"https://ela.st/es-deprecation-7-empty-tier-preference",
"Update the settings for this index to specify an appropriate tier preference.",
false,
null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static Optional<DeprecationIssue> checkDataFeedQuery(DatafeedConfig datafeedConf
new DeprecationIssue(
DeprecationIssue.Level.WARNING,
"Datafeed [" + datafeedConfig.getId() + "] uses deprecated query options",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html#breaking_70_search_changes",
"https://ela.st/es-deprecation-7-datafeed-query-options",
deprecations.toString(),
false,
null
Expand All @@ -56,8 +56,7 @@ static Optional<DeprecationIssue> checkDataFeedAggregations(DatafeedConfig dataf
new DeprecationIssue(
DeprecationIssue.Level.WARNING,
"Datafeed [" + datafeedConfig.getId() + "] uses deprecated aggregation options",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html"
+ "#breaking_70_aggregations_changes",
"https://ela.st/es-deprecation-7-datafeed-aggregation-options",
deprecations.toString(),
false,
null
Expand Down Expand Up @@ -95,7 +94,7 @@ static Optional<DeprecationIssue> checkModelSnapshot(ModelSnapshot modelSnapshot
modelSnapshot.getJobId(),
modelSnapshot.getMinVersion()
),
"https://www.elastic.co/guide/en/elasticsearch/reference/master/ml-upgrade-job-model-snapshot.html",
"https://ela.st/es-deprecation-7-model-snapshot-minimum-version",
details.toString(),
false,
Map.of("job_id", modelSnapshot.getJobId(), "snapshot_id", modelSnapshot.getSnapshotId())
Expand Down

0 comments on commit beee262

Please sign in to comment.