From d0ef25de2de40e3e021149d316671e6f70720bfd Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Fri, 4 Feb 2022 15:15:12 -0500 Subject: [PATCH] Update setting deprecation messages to remove major release references (#83528) (#83553) Updates our setting deprecation messages to avoid references to future major releases. (cherry picked from commit fe2990829ad1acbf761fae58dbda0b9eeb75aa11) --- .../collecting-monitoring-data.asciidoc | 2 +- .../configuring-metricbeat.asciidoc | 4 +- .../restore-snapshot.asciidoc | 4 +- .../common/logging/EvilLoggerTests.java | 3 +- .../common/settings/Setting.java | 3 +- .../test/ESSingleNodeTestCase.java | 5 +- .../org/elasticsearch/test/ESTestCase.java | 3 +- .../collector/ccr/StatsCollectorTests.java | 2 +- .../xpack/deprecation/DeprecationHttpIT.java | 7 +- .../NodeDeprecationChecksTests.java | 28 +++---- .../enrich/EnrichStatsCollectorTests.java | 2 +- ...onitoringHistoryDurationSettingsTests.java | 9 +-- .../monitoring/MonitoringServiceTests.java | 9 +-- .../cleaner/CleanerServiceTests.java | 6 +- .../cluster/ClusterStatsCollectorTests.java | 6 +- .../indices/IndexRecoveryCollectorTests.java | 9 +-- .../indices/IndexStatsCollectorTests.java | 4 +- .../collector/ml/JobStatsCollectorTests.java | 4 +- .../node/NodeStatsCollectorTests.java | 6 +- .../shards/ShardsCollectorTests.java | 3 +- .../exporter/ClusterAlertsUtilTests.java | 4 +- .../monitoring/exporter/ExportersTests.java | 18 ++--- .../http/HttpExporterResourceTests.java | 6 +- .../exporter/http/HttpExporterTests.java | 80 +++++++------------ .../TransportNodeEnrollmentActionTests.java | 5 +- 25 files changed, 89 insertions(+), 143 deletions(-) diff --git a/docs/reference/monitoring/collecting-monitoring-data.asciidoc b/docs/reference/monitoring/collecting-monitoring-data.asciidoc index adc0f166c89a0..a1ec360d4eaaa 100644 --- a/docs/reference/monitoring/collecting-monitoring-data.asciidoc +++ b/docs/reference/monitoring/collecting-monitoring-data.asciidoc @@ -55,7 +55,7 @@ PUT _cluster/settings } } ---------------------------------- -// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.] +// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release.] Alternatively, you can enable this setting in {kib}. In the side navigation, click *Monitoring*. If data collection is disabled, you are prompted to turn it diff --git a/docs/reference/monitoring/configuring-metricbeat.asciidoc b/docs/reference/monitoring/configuring-metricbeat.asciidoc index 4bdaabe1e80d5..70c77c80bb348 100644 --- a/docs/reference/monitoring/configuring-metricbeat.asciidoc +++ b/docs/reference/monitoring/configuring-metricbeat.asciidoc @@ -36,7 +36,7 @@ PUT _cluster/settings } } ---------------------------------- -// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.] +// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release.] If {es} {security-features} are enabled, you must have `monitor` cluster privileges to view the cluster settings and `manage` cluster privileges to change them. @@ -204,7 +204,7 @@ PUT _cluster/settings } } ---------------------------------- -// TEST[warning:[xpack.monitoring.elasticsearch.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.] +// TEST[warning:[xpack.monitoring.elasticsearch.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release.] If {es} {security-features} are enabled, you must have `monitor` cluster privileges to view the cluster settings and `manage` cluster privileges diff --git a/docs/reference/snapshot-restore/restore-snapshot.asciidoc b/docs/reference/snapshot-restore/restore-snapshot.asciidoc index e143e5761ac62..615e3c59eafa4 100644 --- a/docs/reference/snapshot-restore/restore-snapshot.asciidoc +++ b/docs/reference/snapshot-restore/restore-snapshot.asciidoc @@ -337,7 +337,7 @@ PUT _cluster/settings } } ---- -// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.] +// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release.] * Watcher + @@ -462,7 +462,7 @@ PUT _cluster/settings } } ---- -// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.] +// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release.] // TEST[s/true/false/] * Watcher diff --git a/qa/evil-tests/src/test/java/org/elasticsearch/common/logging/EvilLoggerTests.java b/qa/evil-tests/src/test/java/org/elasticsearch/common/logging/EvilLoggerTests.java index 001d8690723fa..5a14f716d9657 100644 --- a/qa/evil-tests/src/test/java/org/elasticsearch/common/logging/EvilLoggerTests.java +++ b/qa/evil-tests/src/test/java/org/elasticsearch/common/logging/EvilLoggerTests.java @@ -207,8 +207,7 @@ public void testDeprecatedSettings() throws IOException, UserException { deprecationEvents.get(0), DeprecationLogger.CRITICAL, "org.elasticsearch.common.logging.DeprecationLogger.lambda\\$doPrivilegedLog\\$0", - "\\[deprecated.foo\\] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version." + "\\[deprecated.foo\\] setting was deprecated in Elasticsearch and will be removed in a future release." ); } } diff --git a/server/src/main/java/org/elasticsearch/common/settings/Setting.java b/server/src/main/java/org/elasticsearch/common/settings/Setting.java index 478fb23fe3034..0337e3e422e6f 100644 --- a/server/src/main/java/org/elasticsearch/common/settings/Setting.java +++ b/server/src/main/java/org/elasticsearch/common/settings/Setting.java @@ -579,8 +579,7 @@ void checkDeprecation(Settings settings) { final String key = getKey(); List skipTheseDeprecations = settings.getAsList("deprecation.skip_deprecated_settings"); if (Regex.simpleMatch(skipTheseDeprecations, key) == false) { - String message = "[{}] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version."; + String message = "[{}] setting was deprecated in Elasticsearch and will be removed in a future release."; if (this.isDeprecatedWarningOnly()) { Settings.DeprecationLoggerHolder.deprecationLogger.warn(DeprecationCategory.SETTINGS, key, message, key); } else { diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java index 276b267557816..16d383a3b73d2 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java @@ -205,10 +205,7 @@ protected boolean addMockHttpTransport() { protected List filteredWarnings() { return Stream.concat( super.filteredWarnings().stream(), - List.of( - "[index.data_path] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version." - ).stream() + List.of("[index.data_path] setting was deprecated in Elasticsearch and will be removed in a future release.").stream() ).collect(Collectors.toList()); } diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java index 920768c7dcc13..092fc0adc61a5 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java @@ -493,8 +493,7 @@ protected final void assertSettingDeprecationsAndWarnings(final Setting[] set assertWarnings(true, Stream.concat(Arrays.stream(settings).map(setting -> { String warningMessage = String.format( Locale.ROOT, - "[%s] setting was deprecated in Elasticsearch and will be " - + "removed in a future release! See the breaking changes documentation for the next major version.", + "[%s] setting was deprecated in Elasticsearch and will be removed in a future release.", setting.getKey() ); return new DeprecationWarning( diff --git a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/monitoring/collector/ccr/StatsCollectorTests.java b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/monitoring/collector/ccr/StatsCollectorTests.java index 54285dc20b2b4..8b2b9d9413c66 100644 --- a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/monitoring/collector/ccr/StatsCollectorTests.java +++ b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/monitoring/collector/ccr/StatsCollectorTests.java @@ -152,7 +152,7 @@ public void testDoCollect() throws Exception { assertWarnings( "[xpack.monitoring.collection.ccr.stats.timeout] setting was deprecated in Elasticsearch and will be removed in " - + "a future release! See the breaking changes documentation for the next major version." + + "a future release." ); } diff --git a/x-pack/plugin/deprecation/qa/rest/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/DeprecationHttpIT.java b/x-pack/plugin/deprecation/qa/rest/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/DeprecationHttpIT.java index 61e33b196a9f5..758f1c46b8b55 100644 --- a/x-pack/plugin/deprecation/qa/rest/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/DeprecationHttpIT.java +++ b/x-pack/plugin/deprecation/qa/rest/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/DeprecationHttpIT.java @@ -149,12 +149,7 @@ public void testDeprecatedSettingsReturnWarnings() throws Exception { TestDeprecationHeaderRestAction.TEST_DEPRECATED_SETTING_TRUE2 )) { headerMatchers.add( - equalTo( - "[" - + setting.getKey() - + "] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version." - ) + equalTo("[" + setting.getKey() + "] setting was deprecated in Elasticsearch and will be removed in a future release.") ); } diff --git a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecksTests.java b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecksTests.java index da4027825c9fd..3a004dc4da692 100644 --- a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecksTests.java +++ b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecksTests.java @@ -492,9 +492,8 @@ public void testScriptContextCompilationsRateLimitSetting() { assertWarnings( "[script.context.field.max_compilations_rate] setting was deprecated in Elasticsearch and will be" - + " removed in a future release! See the breaking changes documentation for the next major version.", - "[script.context.score.max_compilations_rate] setting was deprecated in Elasticsearch and will be removed in a future" - + " release! See the breaking changes documentation for the next major version." + + " removed in a future release.", + "[script.context.score.max_compilations_rate] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -527,9 +526,8 @@ public void testImplicitScriptContextCacheSetting() { assertWarnings( "[script.context.update.max_compilations_rate] setting was deprecated in Elasticsearch and will be" - + " removed in a future release! See the breaking changes documentation for the next major version.", - "[script.context.filter.cache_max_size] setting was deprecated in Elasticsearch and will be removed in a future" - + " release! See the breaking changes documentation for the next major version." + + " removed in a future release.", + "[script.context.filter.cache_max_size] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -562,10 +560,8 @@ public void testScriptContextCacheSizeSetting() { ); assertWarnings( - "[script.context.update.cache_max_size] setting was deprecated in Elasticsearch and will be" - + " removed in a future release! See the breaking changes documentation for the next major version.", - "[script.context.filter.cache_max_size] setting was deprecated in Elasticsearch and will be removed in a future" - + " release! See the breaking changes documentation for the next major version." + "[script.context.update.cache_max_size] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[script.context.filter.cache_max_size] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -598,10 +594,8 @@ public void testScriptContextCacheExpirationSetting() { ); assertWarnings( - "[script.context.interval.cache_expire] setting was deprecated in Elasticsearch and will be" - + " removed in a future release! See the breaking changes documentation for the next major version.", - "[script.context.moving-function.cache_expire] setting was deprecated in Elasticsearch and will be removed in a future" - + " release! See the breaking changes documentation for the next major version." + "[script.context.interval.cache_expire] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[script.context.moving-function.cache_expire] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -655,8 +649,7 @@ public void testLifecyleStepMasterTimeoutSetting() { true, new DeprecationWarning( Level.WARN, - "[indices.lifecycle.step.master_timeout] setting was deprecated in Elasticsearch and will be removed in a future release!" - + " See the breaking changes documentation for the next major version." + "[indices.lifecycle.step.master_timeout] setting was deprecated in Elasticsearch and will be removed in a future release." ) ); } @@ -678,8 +671,7 @@ public void testEqlEnabledSetting() { true, new DeprecationWarning( Level.WARN, - "[xpack.eql.enabled] setting was deprecated in Elasticsearch and will be removed in a future release!" - + " See the breaking changes documentation for the next major version." + "[xpack.eql.enabled] setting was deprecated in Elasticsearch and will be removed in a future release." ) ); } diff --git a/x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/monitoring/collector/enrich/EnrichStatsCollectorTests.java b/x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/monitoring/collector/enrich/EnrichStatsCollectorTests.java index 278c77fb8cc44..3496bb3818778 100644 --- a/x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/monitoring/collector/enrich/EnrichStatsCollectorTests.java +++ b/x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/monitoring/collector/enrich/EnrichStatsCollectorTests.java @@ -143,7 +143,7 @@ public void testDoCollect() throws Exception { assertWarnings( "[xpack.monitoring.collection.enrich.stats.timeout] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); } diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringHistoryDurationSettingsTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringHistoryDurationSettingsTests.java index 904bbd87ed658..58e6a7e06acf6 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringHistoryDurationSettingsTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringHistoryDurationSettingsTests.java @@ -21,8 +21,7 @@ public void testHistoryDurationDefaults7Days() { // Note: this verifies the semantics because this is taken for granted that it never returns null! assertEquals(sevenDays, MonitoringField.HISTORY_DURATION.get(buildSettings(MonitoringField.HISTORY_DURATION.getKey(), null))); assertWarnings( - "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future " - + "release! See the breaking changes documentation for the next major version." + "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -33,8 +32,7 @@ public void testHistoryDurationMinimum24Hours() { MonitoringField.HISTORY_DURATION.get(buildSettings(MonitoringField.HISTORY_DURATION.getKey(), "24h")) ); assertWarnings( - "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future " - + "release! See the breaking changes documentation for the next major version." + "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -46,8 +44,7 @@ public void testHistoryDurationMinimum24HoursBlocksLower() { () -> MonitoringField.HISTORY_DURATION.get(buildSettings(MonitoringField.HISTORY_DURATION.getKey(), oneSecondEarly)) ); assertWarnings( - "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future " - + "release! See the breaking changes documentation for the next major version." + "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release." ); } diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringServiceTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringServiceTests.java index f5b86fc8784cb..d4d8b31b9be1e 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringServiceTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringServiceTests.java @@ -114,8 +114,7 @@ public void testInterval() throws Exception { // take down threads monitoringService.setMonitoringActive(false); assertWarnings( - "[xpack.monitoring.collection.interval] setting was deprecated in Elasticsearch and will be removed in " - + "a future release! See the breaking changes documentation for the next major version." + "[xpack.monitoring.collection.interval] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -140,10 +139,8 @@ public void testSkipExecution() throws Exception { assertThat(exporter.getExportsCount(), equalTo(1)); assertWarnings( - "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in " - + "a future release! See the breaking changes documentation for the next major version.", - "[xpack.monitoring.collection.interval] setting was deprecated in Elasticsearch and will be removed in " - + "a future release! See the breaking changes documentation for the next major version." + "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[xpack.monitoring.collection.interval] setting was deprecated in Elasticsearch and will be removed in a future release." ); } diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerServiceTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerServiceTests.java index 5333db9ba9ed4..cdbdd07527590 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerServiceTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerServiceTests.java @@ -60,8 +60,7 @@ public void testConstructorWithInvalidRetention() { new CleanerService(settings, clusterSettings, threadPool, licenseState); } finally { assertWarnings( - "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in " - + "a future release! See the breaking changes documentation for the next major version." + "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release." ); } } @@ -73,8 +72,7 @@ public void testGetRetention() { assertEquals(expected, new CleanerService(settings, clusterSettings, threadPool, licenseState).getRetention()); assertWarnings( - "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in " - + "a future release! See the breaking changes documentation for the next major version." + "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release." ); } diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollectorTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollectorTests.java index a6e5be35a9c19..441207a5b369b 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollectorTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollectorTests.java @@ -296,7 +296,7 @@ public void testDoCollect() throws Exception { assertWarnings( "[xpack.monitoring.collection.cluster.stats.timeout] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); } @@ -367,7 +367,7 @@ public void testDoCollectNoLicense() throws Exception { assertWarnings( "[xpack.monitoring.collection.cluster.stats.timeout] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); } @@ -432,7 +432,7 @@ public void testDoCollectThrowsTimeoutException() throws Exception { assertWarnings( "[xpack.monitoring.collection.cluster.stats.timeout] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); } diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollectorTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollectorTests.java index 21192cc6c3992..06f819b4a3122 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollectorTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollectorTests.java @@ -171,11 +171,10 @@ public void testDoCollect() throws Exception { assertWarnings( "[xpack.monitoring.collection.index.recovery.timeout] setting was deprecated in Elasticsearch and will be " - + "removed in a future release! See the breaking changes documentation for the next major version.", + + "removed in a future release.", "[xpack.monitoring.collection.index.recovery.active_only] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version.", - "[xpack.monitoring.collection.indices] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version." + + "in a future release.", + "[xpack.monitoring.collection.indices] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -233,7 +232,7 @@ public void testDoCollectThrowsTimeoutException() throws Exception { assertWarnings( "[xpack.monitoring.collection.index.recovery.timeout] setting was deprecated in Elasticsearch and will be " - + "removed in a future release! See the breaking changes documentation for the next major version." + + "removed in a future release." ); } diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollectorTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollectorTests.java index 805e53cebdc90..c921887c03446 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollectorTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollectorTests.java @@ -174,7 +174,7 @@ public void testDoCollect() throws Exception { assertWarnings( "[xpack.monitoring.collection.index.stats.timeout] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); } @@ -217,7 +217,7 @@ public void testDoCollectThrowsTimeoutException() throws Exception { assertWarnings( "[xpack.monitoring.collection.index.stats.timeout] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); } diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsCollectorTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsCollectorTests.java index ff4cfa41c2f0d..3da7d41d3a126 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsCollectorTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsCollectorTests.java @@ -144,7 +144,7 @@ public void testDoCollect() throws Exception { assertWarnings( "[xpack.monitoring.collection.ml.job.stats.timeout] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); } @@ -181,7 +181,7 @@ public void testDoCollectThrowsTimeoutException() throws Exception { assertWarnings( "[xpack.monitoring.collection.ml.job.stats.timeout] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); } diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollectorTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollectorTests.java index cb6a13697e25e..c4399c56191c6 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollectorTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollectorTests.java @@ -70,7 +70,7 @@ public void testDoCollectWithFailures() throws Exception { assertWarnings( "[xpack.monitoring.collection.node.stats.timeout] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); } @@ -128,7 +128,7 @@ public void testDoCollect() throws Exception { assertWarnings( "[xpack.monitoring.collection.node.stats.timeout] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); } @@ -162,7 +162,7 @@ public void testDoCollectThrowsTimeout() throws Exception { assertWarnings( "[xpack.monitoring.collection.node.stats.timeout] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); } diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollectorTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollectorTests.java index 5ac436608c1aa..08949d77c57a0 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollectorTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollectorTests.java @@ -123,8 +123,7 @@ public void testDoCollect() throws Exception { } assertWarnings( - "[xpack.monitoring.collection.indices] setting was deprecated in Elasticsearch and will be removed in a" - + " future release! See the breaking changes documentation for the next major version." + "[xpack.monitoring.collection.indices] setting was deprecated in Elasticsearch and will be removed in a future release." ); } diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ClusterAlertsUtilTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ClusterAlertsUtilTests.java index dc618e825574d..fe2ca57c0582e 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ClusterAlertsUtilTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ClusterAlertsUtilTests.java @@ -117,7 +117,7 @@ public void testGetClusterAlertsBlacklistThrowsForUnknownWatchId() { assertWarnings( "[xpack.monitoring.exporters._random.cluster_alerts.management.blacklist] setting was deprecated in Elasticsearch " - + "and will be removed in a future release! See the breaking changes documentation for the next major version." + + "and will be removed in a future release." ); } @@ -128,7 +128,7 @@ public void testGetClusterAlertsBlacklist() { assertWarnings( "[xpack.monitoring.exporters.any.cluster_alerts.management.blacklist] setting was deprecated in Elasticsearch " - + "and will be removed in a future release! See the breaking changes documentation for the next major version." + + "and will be removed in a future release." ); } diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java index 9480201076edc..548de8592f452 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java @@ -122,7 +122,7 @@ public void testHostsMustBeSetIfTypeIsHttp() { assertThat(e.getCause(), hasToString(containsString("host list for [" + prefix + ".host] is empty"))); assertWarnings( "[xpack.monitoring.exporters.example.type] setting was deprecated in Elasticsearch and will be removed in a " - + "future release! See the breaking changes documentation for the next major version." + + "future release." ); } @@ -140,7 +140,7 @@ public void testIndexNameTimeFormatMustBeValid() { assertThat(e.getCause(), hasToString(containsString("Unknown pattern letter: j"))); assertWarnings( "[xpack.monitoring.exporters.example.index.name.time_format] setting was deprecated in Elasticsearch and will " - + "be removed in a future release! See the breaking changes documentation for the next major version." + + "be removed in a future release." ); } @@ -198,7 +198,7 @@ public void testInitExportersSingleDisabled() throws Exception { assertWarnings( "[xpack.monitoring.exporters._name.enabled] setting was deprecated in Elasticsearch and will be removed in a " - + "future release! See the breaking changes documentation for the next major version." + + "future release." ); } @@ -294,14 +294,12 @@ InitializedExporters initExporters(Settings settings) { assertEquals(settings.get("xpack.monitoring.exporters._name1.cluster_alerts.management.blacklist"), "false"); assertWarnings( - "[xpack.monitoring.exporters._name1.type] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version.", - "[xpack.monitoring.exporters._name0.type] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version.", + "[xpack.monitoring.exporters._name1.type] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[xpack.monitoring.exporters._name0.type] setting was deprecated in Elasticsearch and will be removed in a future release.", "[xpack.monitoring.exporters._name0.cluster_alerts.management.blacklist] setting was deprecated in Elasticsearch and will " - + "be removed in a future release! See the breaking changes documentation for the next major version.", + + "be removed in a future release.", "[xpack.monitoring.exporters._name1.cluster_alerts.management.blacklist] setting was deprecated in Elasticsearch and will " - + "be removed in a future release! See the breaking changes documentation for the next major version." + + "be removed in a future release." ); } @@ -348,7 +346,7 @@ public void testNoExporters() throws Exception { assertWarnings( "[xpack.monitoring.exporters.explicitly_disabled.enabled] setting was deprecated in Elasticsearch and will be " - + "removed in a future release! See the breaking changes documentation for the next major version." + + "removed in a future release." ); } diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterResourceTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterResourceTests.java index b09d8fb984fb4..ae5063507b7cb 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterResourceTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterResourceTests.java @@ -397,9 +397,9 @@ public void testDeployClusterAlerts() { assertWarnings( "[xpack.monitoring.migration.decommission_alerts] setting was deprecated in Elasticsearch and will be " - + "removed in a future release! See the breaking changes documentation for the next major version.", + + "removed in a future release.", "[xpack.monitoring.exporters._http.cluster_alerts.management.enabled] setting was deprecated in Elasticsearch and " - + "will be removed in a future release! See the breaking changes documentation for the next major version." + + "will be removed in a future release." ); } @@ -469,7 +469,7 @@ public void testSuccessfulChecksIfNotElectedMasterNode() { assertWarnings( "[xpack.monitoring.exporters._http.cluster_alerts.management.enabled] setting was deprecated in Elasticsearch " - + "and will be removed in a future release! See the breaking changes documentation for the next major version." + + "and will be removed in a future release." ); } diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java index 66fbe6dcdfe83..9dc7104d4b9d9 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java @@ -104,7 +104,7 @@ private void runTestEmptyHostList(final boolean useDefault) { builder.putList(prefix + ".host", Collections.emptyList()); expectedWarnings.add( "[xpack.monitoring.exporters.example.host] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); } final Settings settings = builder.build(); @@ -117,7 +117,7 @@ private void runTestEmptyHostList(final boolean useDefault) { assertThat(e.getCause(), hasToString(containsString("host list for [" + prefix + ".host] is empty"))); expectedWarnings.add( "[xpack.monitoring.exporters.example.type] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); assertWarnings(expectedWarnings.toArray(new String[0])); } @@ -141,7 +141,7 @@ private void runTestEmptyHostListOkayIfTypeNotSet(final boolean useDefault) { HttpExporter.HOST_SETTING.getConcreteSetting(prefix + ".host").get(settings); assertWarnings( "[xpack.monitoring.exporters.example.host] setting was deprecated in Elasticsearch and will be removed in a " - + "future release! See the breaking changes documentation for the next major version." + + "future release." ); } @@ -154,10 +154,8 @@ public void testHostListIsRejectedIfTypeIsNotHttp() { final SettingsException e = expectThrows(SettingsException.class, () -> clusterSettings.validate(settings, true)); assertThat(e, hasToString(containsString("[" + prefix + ".host] is set but type is [local]"))); assertWarnings( - "[xpack.monitoring.exporters.example.type] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version.", - "[xpack.monitoring.exporters.example.host] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version." + "[xpack.monitoring.exporters.example.type] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[xpack.monitoring.exporters.example.host] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -180,10 +178,9 @@ public void testSecurePasswordIsRejectedIfTypeIsNotHttp() { final SettingsException e = expectThrows(SettingsException.class, () -> clusterSettings.validate(settings, true)); assertThat(e, hasToString(containsString("[" + prefix + settingName + "] is set but type is [local]"))); assertWarnings( - "[xpack.monitoring.exporters.example.type] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version.", + "[xpack.monitoring.exporters.example.type] setting was deprecated in Elasticsearch and will be removed in a future release.", "[xpack.monitoring.exporters.example.auth.secure_password] setting was deprecated in Elasticsearch and will be removed in a " - + "future release! See the breaking changes documentation for the next major version." + + "future release." ); } @@ -201,10 +198,8 @@ public void testInvalidHost() { assertThat(e.getCause().getCause(), instanceOf(IllegalArgumentException.class)); assertThat(e.getCause().getCause(), hasToString(containsString("HttpHosts do not use paths [/]."))); assertWarnings( - "[xpack.monitoring.exporters.example.host] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version.", - "[xpack.monitoring.exporters.example.type] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version." + "[xpack.monitoring.exporters.example.host] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[xpack.monitoring.exporters.example.type] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -229,10 +224,8 @@ public void testMixedSchemes() { assertThat(e.getCause(), instanceOf(SettingsException.class)); assertThat(e.getCause(), hasToString(containsString("[" + prefix + ".host] must use a consistent scheme: http or https"))); assertWarnings( - "[xpack.monitoring.exporters.example.host] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version.", - "[xpack.monitoring.exporters.example.type] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version." + "[xpack.monitoring.exporters.example.host] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[xpack.monitoring.exporters.example.type] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -260,10 +253,8 @@ public void testExporterWithBlacklistedHeaders() { assertThat(exception.getMessage(), equalTo(expected)); assertWarnings( - "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a " - + "future release! See the breaking changes documentation for the next major version.", - "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version." + "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -289,10 +280,8 @@ public void testExporterWithEmptyHeaders() { assertThat(exception.getMessage(), equalTo(expected)); assertWarnings( - "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version.", - "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version." + "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -332,9 +321,9 @@ public void testExporterWithUnknownBlacklistedClusterAlerts() { ); assertWarnings( "[xpack.monitoring.exporters._http.cluster_alerts.management.blacklist] setting was deprecated in Elasticsearch" - + " and will be removed in a future release! See the breaking changes documentation for the next major version.", + + " and will be removed in a future release.", "[xpack.monitoring.exporters._http.cluster_alerts.management.enabled] setting was deprecated in Elasticsearch" - + " and will be removed in a future release! See the breaking changes documentation for the next major version." + + " and will be removed in a future release." ); } @@ -351,10 +340,8 @@ public void testExporterWithHostOnly() throws Exception { new HttpExporter(config, sslService, threadContext, coordinator).close(); assertWarnings( - "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version.", - "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version." + "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -382,7 +369,7 @@ public void testExporterWithInvalidProxyBasePath() throws Exception { assertThat(e.getCause(), hasToString(containsString(expected))); assertWarnings( "[xpack.monitoring.exporters._http.proxy.base_path] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); } @@ -396,12 +383,10 @@ public void testCreateRestClient() throws IOException { .put("xpack.monitoring.exporters._http.type", "http") .put("xpack.monitoring.exporters._http.host", "http://localhost:9200"); expectedWarnings.add( - "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in " - + "a future release! See the breaking changes documentation for the next major version." + "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a future release." ); expectedWarnings.add( - "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in " - + "a future release! See the breaking changes documentation for the next major version." + "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a future release." ); // use basic auth @@ -413,7 +398,7 @@ public void testCreateRestClient() throws IOException { builder.setSecureSettings(mockSecureSettings); expectedWarnings.add( "[xpack.monitoring.exporters._http.auth.username] setting was deprecated in Elasticsearch and will be " - + "removed in a future release! See the breaking changes documentation for the next major version." + + "removed in a future release." ); } @@ -444,8 +429,7 @@ public void testCreateCredentialsProviderWithoutSecurity() { assertNull(provider); assertWarnings( - "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a " - + "future release! See the breaking changes documentation for the next major version." + "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -488,11 +472,9 @@ public void testCreateSniffer() throws IOException { assertWarnings( "[xpack.monitoring.exporters._http.sniff.enabled] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version.", - "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a future release!" - + " See the breaking changes documentation for the next major version.", - "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a future release!" - + " See the breaking changes documentation for the next major version." + + "in a future release.", + "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a future release." ); } @@ -507,8 +489,7 @@ public void testCreateResources() { builder.put("xpack.monitoring.exporters._http.cluster_alerts.management.enabled", true); warningsExpected.add( "[xpack.monitoring.exporters._http.cluster_alerts.management.enabled] setting was deprecated in " - + "Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major " - + "version." + + "Elasticsearch and will be removed in a future release." ); } @@ -516,8 +497,7 @@ public void testCreateResources() { builder.put("xpack.monitoring.exporters._http.index.template.master_timeout", templateTimeout.getStringRep()); warningsExpected.add( "[xpack.monitoring.exporters._http.index.template.master_timeout] setting was deprecated in " - + "Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major " - + "version." + + "Elasticsearch and will be removed in a future release." ); } @@ -590,7 +570,7 @@ public void testCreateDefaultParams() { assertThat(parameters.remove("timeout"), equalTo(bulkTimeout.toString())); assertWarnings( "[xpack.monitoring.exporters._http.bulk.timeout] setting was deprecated in Elasticsearch and will be removed " - + "in a future release! See the breaking changes documentation for the next major version." + + "in a future release." ); } else { assertNull(parameters.remove("timeout")); diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/enrollment/TransportNodeEnrollmentActionTests.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/enrollment/TransportNodeEnrollmentActionTests.java index 547e91f3e639a..d793f29f58550 100644 --- a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/enrollment/TransportNodeEnrollmentActionTests.java +++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/enrollment/TransportNodeEnrollmentActionTests.java @@ -149,10 +149,7 @@ public void testDoExecute() throws Exception { assertThat(response.getNodesAddresses(), hasSize(numberOfNodes)); assertThat(nodesInfoRequests, hasSize(1)); - assertWarnings( - "[keystore.password] setting was deprecated in Elasticsearch and will be removed in a future release! " - + "See the breaking changes documentation for the next major version." - ); + assertWarnings("[keystore.password] setting was deprecated in Elasticsearch and will be removed in a future release."); } private void assertSameCertificate(String cert, Path original, char[] originalPassword, boolean isCa) throws Exception {