Skip to content

Commit b4fb27c

Browse files
authored
[7.x] Improve transient settings deprecation message (#79504) (#79524)
Update message as per docs team's suggestion.
1 parent 07f4f00 commit b4fb27c

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,9 @@ static DeprecationIssue checkILMFreezeActions(ClusterState state) {
417417
static DeprecationIssue checkTransientSettingsExistence(ClusterState state) {
418418
if (state.metadata().transientSettings().isEmpty() == false) {
419419
return new DeprecationIssue(DeprecationIssue.Level.WARNING,
420-
"Transient cluster settings are in the process of being removed.",
420+
"Transient cluster settings are deprecated",
421421
"https://ela.st/es-deprecation-7-transient-cluster-settings",
422-
"Use persistent settings to define your cluster settings instead.",
422+
"Use persistent settings to configure your cluster.",
423423
false,
424424
null);
425425
}

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

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,9 @@ public void testClusterRoutingAllocationIncludeRelocationsSetting() {
357357
);
358358

359359
final DeprecationIssue otherExpectedIssue = new DeprecationIssue(DeprecationIssue.Level.WARNING,
360-
"Transient cluster settings are in the process of being removed.",
360+
"Transient cluster settings are deprecated",
361361
"https://ela.st/es-deprecation-7-transient-cluster-settings",
362-
"Use persistent settings to define your cluster settings instead.",
362+
"Use persistent settings to configure your cluster.",
363363
false, null);
364364

365365
List<DeprecationIssue> issues = DeprecationChecks.filterChecks(CLUSTER_SETTINGS_CHECKS, c -> c.apply(clusterState));
@@ -564,24 +564,31 @@ public void testCheckILMFreezeActions() throws Exception {
564564
}
565565

566566
public void testCheckTransientSettingsExistence() {
567+
Settings persistentSettings = Settings.builder()
568+
.put("xpack.monitoring.collection.enabled", true)
569+
.build();
570+
567571
Settings transientSettings = Settings.builder()
568572
.put("indices.recovery.max_bytes_per_sec", "20mb")
573+
.put("action.auto_create_index", true)
574+
.put("cluster.routing.allocation.enable", "primaries")
569575
.build();
570576
Metadata metadataWithTransientSettings = Metadata.builder()
577+
.persistentSettings(persistentSettings)
571578
.transientSettings(transientSettings)
572579
.build();
573580

574581
ClusterState badState = ClusterState.builder(new ClusterName("test")).metadata(metadataWithTransientSettings).build();
575582
DeprecationIssue issue = ClusterDeprecationChecks.checkTransientSettingsExistence(badState);
576583
assertThat(issue, equalTo(
577584
new DeprecationIssue(DeprecationIssue.Level.WARNING,
578-
"Transient cluster settings are in the process of being removed.",
585+
"Transient cluster settings are deprecated",
579586
"https://ela.st/es-deprecation-7-transient-cluster-settings",
580-
"Use persistent settings to define your cluster settings instead.",
587+
"Use persistent settings to configure your cluster.",
581588
false, null)
582589
));
583590

584-
Settings persistentSettings = Settings.builder()
591+
persistentSettings = Settings.builder()
585592
.put("indices.recovery.max_bytes_per_sec", "20mb")
586593
.build();
587594
Metadata metadataWithoutTransientSettings = Metadata.builder()

0 commit comments

Comments
 (0)