Skip to content

Commit 223c5cb

Browse files
Address review comments
1 parent af21543 commit 223c5cb

File tree

24 files changed

+89
-89
lines changed

24 files changed

+89
-89
lines changed

server/src/main/java/org/elasticsearch/common/settings/Setting.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@
8484
public class Setting<T> implements ToXContentObject {
8585
private static final String DEPRECATED_MESSAGE_TEMPLATE =
8686
"[{}] setting was deprecated in Elasticsearch and will be removed in a future release. "
87-
+ "See the %s changes documentation for the next major version.";
88-
private static final String DEPRECATED_WARN_MESSAGE = String.format(Locale.ROOT, DEPRECATED_MESSAGE_TEMPLATE, "deprecation");
89-
private static final String DEPRECATED_CRITICAL_MESSAGE = String.format(Locale.ROOT, DEPRECATED_MESSAGE_TEMPLATE, "breaking");
87+
+ "See the %s documentation for the next major version.";
88+
private static final String DEPRECATED_WARN_MESSAGE = Strings.format(DEPRECATED_MESSAGE_TEMPLATE, "deprecation");
89+
private static final String DEPRECATED_CRITICAL_MESSAGE = Strings.format(DEPRECATED_MESSAGE_TEMPLATE, "breaking changes");
9090

9191
public enum Property {
9292
/**

server/src/test/java/org/elasticsearch/index/codec/PerFieldMapperCodecTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void testUseBloomFilterWithTimestampFieldEnabled_disableBloomFilter() thr
113113
assertThat(perFieldMapperCodec.getPostingsFormatForField("_id"), instanceOf(ES812PostingsFormat.class));
114114
assertWarnings(
115115
"[index.bloom_filter_for_id_field.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. "
116-
+ "See the deprecation changes documentation for the next major version."
116+
+ "See the deprecation documentation for the next major version."
117117
);
118118
}
119119

test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ protected List<String> filteredWarnings() {
236236
super.filteredWarnings().stream(),
237237
Stream.of(
238238
"[index.data_path] setting was deprecated in Elasticsearch and will be removed in a future release. "
239-
+ "See the deprecation changes documentation for the next major version."
239+
+ "See the deprecation documentation for the next major version."
240240
)
241241
).collect(Collectors.toList());
242242
}

x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/monitoring/collector/ccr/StatsCollectorTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public void testDoCollect() throws Exception {
152152

153153
assertWarnings(
154154
"[xpack.monitoring.collection.ccr.stats.timeout] setting was deprecated in Elasticsearch and will be removed in "
155-
+ "a future release. See the deprecation changes documentation for the next major version."
155+
+ "a future release. See the deprecation documentation for the next major version."
156156
);
157157
}
158158

x-pack/plugin/deprecation/qa/rest/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/DeprecationHttpIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public void testDeprecatedSettingsReturnWarnings() throws Exception {
131131

132132
private Matcher<String> matchDeprecationWarning(Setting<?> setting) {
133133
var format = "[%s] setting was deprecated in Elasticsearch and will be removed in a future release. "
134-
+ "See the deprecation changes documentation for the next major version.";
134+
+ "See the deprecation documentation for the next major version.";
135135
return equalTo(Strings.format(format, setting.getKey()));
136136
}
137137

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
@@ -591,9 +591,9 @@ public void testScriptContextCompilationsRateLimitSetting() {
591591

592592
assertWarnings(
593593
"[script.context.field.max_compilations_rate] setting was deprecated in Elasticsearch and will be"
594-
+ " removed in a future release. See the deprecation changes documentation for the next major version.",
594+
+ " removed in a future release. See the deprecation documentation for the next major version.",
595595
"[script.context.score.max_compilations_rate] setting was deprecated in Elasticsearch and will be removed in a future release. "
596-
+ "See the deprecation changes documentation for the next major version."
596+
+ "See the deprecation documentation for the next major version."
597597
);
598598
}
599599

@@ -629,9 +629,9 @@ public void testImplicitScriptContextCacheSetting() {
629629

630630
assertWarnings(
631631
"[script.context.update.max_compilations_rate] setting was deprecated in Elasticsearch and will be"
632-
+ " removed in a future release. See the deprecation changes documentation for the next major version.",
632+
+ " removed in a future release. See the deprecation documentation for the next major version.",
633633
"[script.context.filter.cache_max_size] setting was deprecated in Elasticsearch and will be removed in a future release. "
634-
+ "See the deprecation changes documentation for the next major version."
634+
+ "See the deprecation documentation for the next major version."
635635
);
636636
}
637637

@@ -668,9 +668,9 @@ public void testScriptContextCacheSizeSetting() {
668668

669669
assertWarnings(
670670
"[script.context.update.cache_max_size] setting was deprecated in Elasticsearch and will be removed in a future release. "
671-
+ "See the deprecation changes documentation for the next major version.",
671+
+ "See the deprecation documentation for the next major version.",
672672
"[script.context.filter.cache_max_size] setting was deprecated in Elasticsearch and will be removed in a future release. "
673-
+ "See the deprecation changes documentation for the next major version."
673+
+ "See the deprecation documentation for the next major version."
674674
);
675675
}
676676

@@ -707,9 +707,9 @@ public void testScriptContextCacheExpirationSetting() {
707707

708708
assertWarnings(
709709
"[script.context.interval.cache_expire] setting was deprecated in Elasticsearch and will be removed in a future release. "
710-
+ "See the deprecation changes documentation for the next major version.",
710+
+ "See the deprecation documentation for the next major version.",
711711
"[script.context.moving-function.cache_expire] setting was deprecated in Elasticsearch and will be removed in a future release."
712-
+ " See the deprecation changes documentation for the next major version."
712+
+ " See the deprecation documentation for the next major version."
713713
);
714714
}
715715

@@ -767,7 +767,7 @@ public void testLifecyleStepMasterTimeoutSetting() {
767767
new DeprecationWarning(
768768
Level.WARN,
769769
"[indices.lifecycle.step.master_timeout] setting was deprecated in Elasticsearch and will be removed in a future release. "
770-
+ "See the deprecation changes documentation for the next major version."
770+
+ "See the deprecation documentation for the next major version."
771771
)
772772
);
773773
}
@@ -790,7 +790,7 @@ public void testEqlEnabledSetting() {
790790
new DeprecationWarning(
791791
Level.WARN,
792792
"[xpack.eql.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. "
793-
+ "See the deprecation changes documentation for the next major version."
793+
+ "See the deprecation documentation for the next major version."
794794
)
795795
);
796796
}

x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/monitoring/collector/enrich/EnrichStatsCollectorTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public void testDoCollect() throws Exception {
149149

150150
assertWarnings(
151151
"[xpack.monitoring.collection.enrich.stats.timeout] setting was deprecated in Elasticsearch and will be removed "
152-
+ "in a future release. See the deprecation changes documentation for the next major version."
152+
+ "in a future release. See the deprecation documentation for the next major version."
153153
);
154154
}
155155

x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/TimeSeriesRestDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public static Map<String, Map<String, Object>> explain(RestClient client, String
9797
.setWarningsHandler(warnings -> warnings.isEmpty() == false && List.of("""
9898
[indices.lifecycle.rollover.only_if_has_documents] setting was deprecated in Elasticsearch \
9999
and will be removed in a future release. \
100-
See the deprecation changes documentation for the next major version.""").equals(warnings) == false)
100+
See the deprecation documentation for the next major version.""").equals(warnings) == false)
101101
.build();
102102

103103
Request explainRequest = new Request("GET", indexPattern + "/_ilm/explain");

x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringHistoryDurationSettingsTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void testHistoryDurationDefaults7Days() {
2222
assertEquals(sevenDays, MonitoringField.HISTORY_DURATION.get(buildSettings(MonitoringField.HISTORY_DURATION.getKey(), null)));
2323
assertWarnings(
2424
"[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release. "
25-
+ "See the deprecation changes documentation for the next major version."
25+
+ "See the deprecation documentation for the next major version."
2626
);
2727
}
2828

@@ -34,7 +34,7 @@ public void testHistoryDurationMinimum24Hours() {
3434
);
3535
assertWarnings(
3636
"[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release. "
37-
+ "See the deprecation changes documentation for the next major version."
37+
+ "See the deprecation documentation for the next major version."
3838
);
3939
}
4040

@@ -47,7 +47,7 @@ public void testHistoryDurationMinimum24HoursBlocksLower() {
4747
);
4848
assertWarnings(
4949
"[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release. "
50-
+ "See the deprecation changes documentation for the next major version."
50+
+ "See the deprecation documentation for the next major version."
5151
);
5252
}
5353

x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringServiceTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public void testInterval() throws Exception {
111111
monitoringService.setMonitoringActive(false);
112112
assertWarnings(
113113
"[xpack.monitoring.collection.interval] setting was deprecated in Elasticsearch and will be removed in a future release. "
114-
+ "See the deprecation changes documentation for the next major version."
114+
+ "See the deprecation documentation for the next major version."
115115
);
116116
}
117117

@@ -137,9 +137,9 @@ public void testSkipExecution() throws Exception {
137137
assertThat(exporter.getExportsCount(), equalTo(1));
138138
assertWarnings(
139139
"[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. "
140-
+ "See the deprecation changes documentation for the next major version.",
140+
+ "See the deprecation documentation for the next major version.",
141141
"[xpack.monitoring.collection.interval] setting was deprecated in Elasticsearch and will be removed in a future release. "
142-
+ "See the deprecation changes documentation for the next major version."
142+
+ "See the deprecation documentation for the next major version."
143143
);
144144
}
145145

0 commit comments

Comments
 (0)