diff --git a/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/RepositoryCredentialsTests.java b/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/RepositoryCredentialsTests.java index 8e5f6634372db..46f4d95588801 100644 --- a/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/RepositoryCredentialsTests.java +++ b/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/RepositoryCredentialsTests.java @@ -107,8 +107,10 @@ public void testRepositoryCredentialsOverrideSecureCredentials() { assertThat(credentials.getAWSSecretKey(), is("insecure_aws_secret")); assertCriticalWarnings( - "[access_key] setting was deprecated in Elasticsearch and will be removed in a future release.", - "[secret_key] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[access_key] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version.", + "[secret_key] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version.", S3Repository.INSECURE_CREDENTIALS_DEPRECATION_WARNING ); } @@ -193,8 +195,10 @@ public void testReinitSecureCredentials() { if (hasInsecureSettings) { assertCriticalWarnings( - "[access_key] setting was deprecated in Elasticsearch and will be removed in a future release.", - "[secret_key] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[access_key] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version.", + "[secret_key] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version.", S3Repository.INSECURE_CREDENTIALS_DEPRECATION_WARNING ); } 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 f3319a8f85bfb..53dc3682388d7 100644 --- a/server/src/main/java/org/elasticsearch/common/settings/Setting.java +++ b/server/src/main/java/org/elasticsearch/common/settings/Setting.java @@ -25,7 +25,6 @@ import org.elasticsearch.core.TimeValue; import org.elasticsearch.core.Tuple; import org.elasticsearch.core.UpdateForV10; -import org.elasticsearch.core.UpdateForV9; import org.elasticsearch.index.mapper.DateFieldMapper; import org.elasticsearch.xcontent.ToXContentObject; import org.elasticsearch.xcontent.XContentBuilder; @@ -83,6 +82,11 @@ * */ public class Setting implements ToXContentObject { + private static final String DEPRECATED_MESSAGE_TEMPLATE = + "[{}] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the %s documentation for the next major version."; + private static final String DEPRECATED_WARN_MESSAGE = Strings.format(DEPRECATED_MESSAGE_TEMPLATE, "deprecation"); + private static final String DEPRECATED_CRITICAL_MESSAGE = Strings.format(DEPRECATED_MESSAGE_TEMPLATE, "breaking changes"); public enum Property { /** @@ -651,10 +655,8 @@ void checkDeprecation(Settings settings) { if (this.isDeprecated() && this.exists(settings)) { // It would be convenient to show its replacement key, but replacement is often not so simple final String key = getKey(); - @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // https://github.com/elastic/elasticsearch/issues/79666 - 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); + Settings.DeprecationLoggerHolder.deprecationLogger.warn(DeprecationCategory.SETTINGS, key, DEPRECATED_WARN_MESSAGE, key); } else if (this.isDeprecatedAndRemoved()) { Settings.DeprecationLoggerHolder.deprecationLogger.critical( DeprecationCategory.SETTINGS, @@ -663,7 +665,12 @@ void checkDeprecation(Settings settings) { key ); } else { - Settings.DeprecationLoggerHolder.deprecationLogger.critical(DeprecationCategory.SETTINGS, key, message, key); + Settings.DeprecationLoggerHolder.deprecationLogger.critical( + DeprecationCategory.SETTINGS, + key, + DEPRECATED_CRITICAL_MESSAGE, + key + ); } } } diff --git a/server/src/test/java/org/elasticsearch/cluster/ClusterModuleTests.java b/server/src/test/java/org/elasticsearch/cluster/ClusterModuleTests.java index 52be7004209bb..3d65b48663972 100644 --- a/server/src/test/java/org/elasticsearch/cluster/ClusterModuleTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/ClusterModuleTests.java @@ -189,7 +189,8 @@ public void testRegisterShardsAllocator() { ClusterModule module = newClusterModuleWithShardsAllocator(settings, "custom", FakeShardsAllocator::new); assertEquals(FakeShardsAllocator.class, module.shardsAllocator.getClass()); assertCriticalWarnings( - "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release." + "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } @@ -219,7 +220,8 @@ public void testUnknownShardsAllocator() { ); assertEquals("Unknown ShardsAllocator [dne]", e.getMessage()); assertCriticalWarnings( - "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release." + "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } @@ -227,7 +229,8 @@ public void testShardsAllocatorFactoryNull() { Settings settings = Settings.builder().put(ClusterModule.SHARDS_ALLOCATOR_TYPE_SETTING.getKey(), "bad").build(); expectThrows(NullPointerException.class, () -> newClusterModuleWithShardsAllocator(settings, "bad", () -> null)); assertCriticalWarnings( - "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release." + "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java index 96d4798ae6939..269e6bba80d4c 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java @@ -704,7 +704,8 @@ public void beforeAllocation(RoutingAllocation allocation) { } ); assertCriticalWarnings( - "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release." + "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); Metadata metadata = Metadata.builder() diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/IndexBalanceTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/IndexBalanceTests.java index a35454e9bd453..688f600c8225b 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/IndexBalanceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/IndexBalanceTests.java @@ -449,7 +449,8 @@ public void testRebalanceShouldNotPerformUnnecessaryMovesWithMultipleConcurrentR final var allocationService = createAllocationService(settings); assertCriticalWarnings( - "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release." + "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); assertTrue( diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ThrottlingAllocationTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ThrottlingAllocationTests.java index e4adcb46fc6a6..1cd74a38b4147 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ThrottlingAllocationTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ThrottlingAllocationTests.java @@ -200,7 +200,8 @@ public void testThrottleIncomingAndOutgoing() { snapshotsInfoService ); assertCriticalWarnings( - "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release." + "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); logger.info("Building initial routing table"); diff --git a/server/src/test/java/org/elasticsearch/index/codec/PerFieldMapperCodecTests.java b/server/src/test/java/org/elasticsearch/index/codec/PerFieldMapperCodecTests.java index e4bd6fb14cc59..02883f8317f9e 100644 --- a/server/src/test/java/org/elasticsearch/index/codec/PerFieldMapperCodecTests.java +++ b/server/src/test/java/org/elasticsearch/index/codec/PerFieldMapperCodecTests.java @@ -112,7 +112,8 @@ public void testUseBloomFilterWithTimestampFieldEnabled_disableBloomFilter() thr assertThat(perFieldMapperCodec.useBloomFilter("_id"), is(false)); assertThat(perFieldMapperCodec.getPostingsFormatForField("_id"), instanceOf(ES812PostingsFormat.class)); assertWarnings( - "[index.bloom_filter_for_id_field.enabled] setting was deprecated in Elasticsearch and will be removed in a future release." + "[index.bloom_filter_for_id_field.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." ); } diff --git a/server/src/test/java/org/elasticsearch/snapshots/InternalSnapshotsInfoServiceTests.java b/server/src/test/java/org/elasticsearch/snapshots/InternalSnapshotsInfoServiceTests.java index ea1cf795429e4..b15e2970927ef 100644 --- a/server/src/test/java/org/elasticsearch/snapshots/InternalSnapshotsInfoServiceTests.java +++ b/server/src/test/java/org/elasticsearch/snapshots/InternalSnapshotsInfoServiceTests.java @@ -362,7 +362,8 @@ public IndexShardSnapshotStatus.Copy getShardSnapshotStatus(SnapshotId snapshotI snapshotsInfoService ); assertCriticalWarnings( - "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release." + "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); applyClusterState( "starting shards for " + indexName, diff --git a/server/src/test/java/org/elasticsearch/snapshots/SnapshotResiliencyTests.java b/server/src/test/java/org/elasticsearch/snapshots/SnapshotResiliencyTests.java index 0af5414ff53cf..300069befb835 100644 --- a/server/src/test/java/org/elasticsearch/snapshots/SnapshotResiliencyTests.java +++ b/server/src/test/java/org/elasticsearch/snapshots/SnapshotResiliencyTests.java @@ -2202,7 +2202,8 @@ public RecyclerBytesStreamOutput newNetworkBytesStream() { snapshotsInfoService ); assertCriticalWarnings( - "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release." + "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); rerouteService = new BatchedRerouteService(clusterService, allocationService::reroute); rerouteServiceSetOnce.set(rerouteService); diff --git a/server/src/test/java/org/elasticsearch/transport/TransportServiceLifecycleTests.java b/server/src/test/java/org/elasticsearch/transport/TransportServiceLifecycleTests.java index b631eddc5173b..5eeb6f65a03bb 100644 --- a/server/src/test/java/org/elasticsearch/transport/TransportServiceLifecycleTests.java +++ b/server/src/test/java/org/elasticsearch/transport/TransportServiceLifecycleTests.java @@ -171,7 +171,8 @@ public void testInternalSendExceptionForksToGenericIfHandlerDoesNotForkAndStackO assertEquals("simulated exception in sendRequest", getSendRequestException(future, IOException.class).getMessage()); } assertWarnings( - "[transport.enable_stack_protection] setting was deprecated in Elasticsearch and will be removed in a future release." + "[transport.enable_stack_protection] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } @@ -264,7 +265,8 @@ public void testOnConnectionClosedUsesHandlerExecutor() { onConnectionClosedUsesHandlerExecutor(settings, executorName, expectedExecutor); if (withSetting) { assertWarnings( - "[transport.enable_stack_protection] setting was deprecated in Elasticsearch and will be removed in a future release." + "[transport.enable_stack_protection] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } } @@ -276,7 +278,8 @@ public void testOnConnectionCloseStackOverflowAvoidance() { ThreadPool.Names.GENERIC ); assertWarnings( - "[transport.enable_stack_protection] setting was deprecated in Elasticsearch and will be removed in a future release." + "[transport.enable_stack_protection] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } 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 9bee617d90db9..a786eaf4aca5f 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java @@ -234,7 +234,10 @@ protected boolean addMockHttpTransport() { protected List filteredWarnings() { return Stream.concat( super.filteredWarnings().stream(), - Stream.of("[index.data_path] setting was deprecated in Elasticsearch and will be removed in a future release.") + Stream.of( + "[index.data_path] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." + ) ).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 936e203135766..bb98307fc126c 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java @@ -699,15 +699,14 @@ protected List filteredWarnings() { */ protected final void assertSettingDeprecationsAndWarnings(final Setting[] settings, final DeprecationWarning... warnings) { 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.", - setting.getKey() - ); - return new DeprecationWarning( - setting.getProperties().contains(Setting.Property.Deprecated) ? DeprecationLogger.CRITICAL : Level.WARN, - warningMessage + Level level = setting.getProperties().contains(Setting.Property.Deprecated) ? DeprecationLogger.CRITICAL : Level.WARN; + String warningMessage = Strings.format( + "[%s] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the %s documentation for the next major version.", + setting.getKey(), + (level == Level.WARN) ? "deprecation" : "breaking changes" ); + return new DeprecationWarning(level, warningMessage); }), Arrays.stream(warnings)).toArray(DeprecationWarning[]::new)); } 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 98c41c7d2a943..9ec83bc325fb3 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." + + "a future release. See the deprecation documentation for the next major version." ); } 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 2136129a671c8..57bda3b35a1ad 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 @@ -130,7 +130,8 @@ public void testDeprecatedSettingsReturnWarnings() throws Exception { } private Matcher matchDeprecationWarning(Setting setting) { - var format = "[%s] setting was deprecated in Elasticsearch and will be removed in a future release."; + var format = "[%s] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version."; return equalTo(Strings.format(format, setting.getKey())); } 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 18b85ff532234..15dfe810ab4c9 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 @@ -591,8 +591,9 @@ public void testScriptContextCompilationsRateLimitSetting() { assertWarnings( "[script.context.field.max_compilations_rate] setting was deprecated in Elasticsearch and will be" - + " removed in a future release.", - "[script.context.score.max_compilations_rate] setting was deprecated in Elasticsearch and will be removed in a future release." + + " removed in a future release. See the deprecation 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 deprecation documentation for the next major version." ); } @@ -628,8 +629,9 @@ public void testImplicitScriptContextCacheSetting() { assertWarnings( "[script.context.update.max_compilations_rate] 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." + + " removed in a future release. See the deprecation 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 deprecation documentation for the next major version." ); } @@ -665,8 +667,10 @@ public void testScriptContextCacheSizeSetting() { ); assertWarnings( - "[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." + "[script.context.update.cache_max_size] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation 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 deprecation documentation for the next major version." ); } @@ -702,8 +706,10 @@ public void testScriptContextCacheExpirationSetting() { ); assertWarnings( - "[script.context.interval.cache_expire] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[script.context.interval.cache_expire] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation 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 deprecation documentation for the next major version." ); } @@ -760,7 +766,8 @@ 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." + "[indices.lifecycle.step.master_timeout] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." ) ); } @@ -782,7 +789,8 @@ public void testEqlEnabledSetting() { true, new DeprecationWarning( Level.WARN, - "[xpack.eql.enabled] setting was deprecated in Elasticsearch and will be removed in a future release." + "[xpack.eql.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." ) ); } diff --git a/x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichPluginTests.java b/x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichPluginTests.java index 07de0e0967448..30ddeed24db88 100644 --- a/x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichPluginTests.java +++ b/x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichPluginTests.java @@ -53,7 +53,10 @@ public void testConstructWithBothSettings() { @Override protected List filteredWarnings() { final var warnings = super.filteredWarnings(); - warnings.add("[enrich.cache.size] setting was deprecated in Elasticsearch and will be removed in a future release."); + warnings.add( + "[enrich.cache.size] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); warnings.add( "The [enrich.cache.size] setting is deprecated and will be removed in a future version. Please use [enrich.cache_size] instead." ); 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 2a069eb596760..38357df380ee3 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 @@ -146,7 +146,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." + + "in a future release. See the deprecation documentation for the next major version." ); } diff --git a/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/TimeSeriesRestDriver.java b/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/TimeSeriesRestDriver.java index 11edfff9ee108..c90958254fb99 100644 --- a/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/TimeSeriesRestDriver.java +++ b/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/TimeSeriesRestDriver.java @@ -96,7 +96,8 @@ public static Map> explain(RestClient client, String RequestOptions consumeWarningsOptions = RequestOptions.DEFAULT.toBuilder() .setWarningsHandler(warnings -> warnings.isEmpty() == false && List.of(""" [indices.lifecycle.rollover.only_if_has_documents] setting was deprecated in Elasticsearch \ - and will be removed in a future release.""").equals(warnings) == false) + and will be removed in a future release. \ + See the deprecation documentation for the next major version.""").equals(warnings) == false) .build(); Request explainRequest = new Request("GET", indexPattern + "/_ilm/explain"); 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 58e6a7e06acf6..4022927c215f1 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,7 +21,8 @@ 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." + "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." ); } @@ -32,7 +33,8 @@ 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." + "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." ); } @@ -44,7 +46,8 @@ 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." + "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." ); } 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 0aabd1b6cf2bc..261dbd3b4e4d2 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 @@ -110,7 +110,8 @@ 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." + "[xpack.monitoring.collection.interval] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." ); } @@ -135,8 +136,10 @@ 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.", - "[xpack.monitoring.collection.interval] setting was deprecated in Elasticsearch and will be removed in a future release." + "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation 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 deprecation documentation for the next major version." ); } 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 e50fe2939a51d..84262c23a8f33 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 @@ -59,7 +59,8 @@ public void testConstructorWithInvalidRetention() { new CleanerService(settings, clusterSettings, threadPool); } finally { assertWarnings( - "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release." + "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." ); } } @@ -71,7 +72,8 @@ public void testGetRetention() { assertEquals(expected, new CleanerService(settings, clusterSettings, threadPool).getRetention()); assertWarnings( - "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release." + "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." ); } 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 d5aeebd63a9e5..a011bb1dc6ee0 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." + + "in a future release. See the deprecation documentation for the next major version." ); } @@ -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." + + "in a future release. See the deprecation documentation for the next major version." ); } @@ -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." + + "in a future release. See the deprecation documentation for the next major version." ); } 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 d38bdf74e2531..861d6335b3c4d 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 @@ -168,10 +168,11 @@ 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.", + + "removed in a future release. See the deprecation documentation for the next major version.", "[xpack.monitoring.collection.index.recovery.active_only] setting was deprecated in Elasticsearch and will be removed " - + "in a future release.", - "[xpack.monitoring.collection.indices] setting was deprecated in Elasticsearch and will be removed in a future release." + + "in a future release. See the deprecation 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 deprecation documentation for the next major version." ); } @@ -227,7 +228,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." + + "removed in a future release. See the deprecation documentation for the next major version." ); } 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 a17d90d250609..5d4a6aea610fa 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 @@ -171,7 +171,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." + + "in a future release. See the deprecation documentation for the next major version." ); } @@ -212,7 +212,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." + + "in a future release. See the deprecation documentation for the next major version." ); } 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 0bd438bd61d21..6e16901775599 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." + + "in a future release. See the deprecation documentation for the next major version." ); } @@ -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." + + "in a future release. See the deprecation documentation for the next major version." ); } 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 09f69736a43c8..5d6a44c8446a6 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." + + "in a future release. See the deprecation documentation for the next major version." ); } @@ -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." + + "in a future release. See the deprecation documentation for the next major version." ); } @@ -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." + + "in a future release. See the deprecation documentation for the next major version." ); } 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 1dc75be14d5c7..1cb808bf39caf 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 @@ -138,7 +138,8 @@ public void testDoCollect() throws Exception { } assertWarnings( - "[xpack.monitoring.collection.indices] setting was deprecated in Elasticsearch and will be removed in a future release." + "[xpack.monitoring.collection.indices] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." ); } 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 fe2ca57c0582e..068d12305d52e 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." + + "and will be removed in a future release. See the deprecation documentation for the next major version." ); } @@ -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." + + "and will be removed in a future release. See the deprecation documentation for the next major version." ); } 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 d5ccda90cfb28..d3a336c62281e 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 @@ -123,7 +123,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." + + "future release. See the deprecation documentation for the next major version." ); } @@ -141,7 +141,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." + + "be removed in a future release. See the deprecation documentation for the next major version." ); } @@ -199,7 +199,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." + + "future release. See the deprecation documentation for the next major version." ); } @@ -295,12 +295,14 @@ 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.", - "[xpack.monitoring.exporters._name0.type] setting was deprecated in Elasticsearch and will be removed in a future release.", + "[xpack.monitoring.exporters._name1.type] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation 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 deprecation documentation for the next major version.", "[xpack.monitoring.exporters._name0.cluster_alerts.management.blacklist] setting was deprecated in Elasticsearch and will " - + "be removed in a future release.", + + "be removed in a future release. See the deprecation documentation for the next major version.", "[xpack.monitoring.exporters._name1.cluster_alerts.management.blacklist] setting was deprecated in Elasticsearch and will " - + "be removed in a future release." + + "be removed in a future release. See the deprecation documentation for the next major version." ); } @@ -347,7 +349,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." + + "removed in a future release. See the deprecation documentation for the next major version." ); } 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 e8d47bffa0ea2..784783ae1f8c3 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.", + + "removed in a future release. See the deprecation documentation for the next major version.", "[xpack.monitoring.exporters._http.cluster_alerts.management.enabled] setting was deprecated in Elasticsearch and " - + "will be removed in a future release." + + "will be removed in a future release. See the deprecation documentation for the next major version." ); } @@ -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." + + "and will be removed in a future release. See the deprecation documentation for the next major version." ); } 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 fec656e76cc0d..2cce5adfdaa7e 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 @@ -106,7 +106,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." + + "in a future release. See the deprecation documentation for the next major version." ); } final Settings settings = builder.build(); @@ -119,7 +119,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." + + "in a future release. See the deprecation documentation for the next major version." ); assertWarnings(expectedWarnings.toArray(new String[0])); } @@ -143,7 +143,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." + + "future release. See the deprecation documentation for the next major version." ); } @@ -156,8 +156,10 @@ 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.", - "[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. " + + "See the deprecation 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 deprecation documentation for the next major version." ); } @@ -180,9 +182,10 @@ 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.", + "[xpack.monitoring.exporters.example.type] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version.", "[xpack.monitoring.exporters.example.auth.secure_password] setting was deprecated in Elasticsearch and will be removed in a " - + "future release." + + "future release. See the deprecation documentation for the next major version." ); } @@ -200,8 +203,10 @@ 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.", - "[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. " + + "See the deprecation 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 deprecation documentation for the next major version." ); } @@ -226,8 +231,10 @@ 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.", - "[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. " + + "See the deprecation 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 deprecation documentation for the next major version." ); } @@ -255,8 +262,10 @@ 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.", - "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a future release." + "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation 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 deprecation documentation for the next major version." ); } @@ -282,8 +291,10 @@ 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.", - "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a future release." + "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation 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 deprecation documentation for the next major version." ); } @@ -323,9 +334,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.", + + " and will be removed in a future release. See the deprecation documentation for the next major version.", "[xpack.monitoring.exporters._http.cluster_alerts.management.enabled] setting was deprecated in Elasticsearch" - + " and will be removed in a future release." + + " and will be removed in a future release. See the deprecation documentation for the next major version." ); } @@ -342,8 +353,10 @@ 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.", - "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a future release." + "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation 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 deprecation documentation for the next major version." ); } @@ -371,7 +384,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." + + "in a future release. See the deprecation documentation for the next major version." ); } @@ -385,10 +398,12 @@ 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." + "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." ); expectedWarnings.add( - "[xpack.monitoring.exporters._http.type] 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. " + + "See the deprecation documentation for the next major version." ); // use basic auth @@ -400,7 +415,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." + + "removed in a future release. See the deprecation documentation for the next major version." ); } @@ -431,7 +446,8 @@ public void testCreateCredentialsProviderWithoutSecurity() { assertNull(provider); assertWarnings( - "[xpack.monitoring.exporters._http.type] 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. " + + "See the deprecation documentation for the next major version." ); } @@ -474,9 +490,11 @@ 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.", - "[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." + + "in a future release. See the deprecation 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 deprecation 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 deprecation documentation for the next major version." ); } @@ -491,7 +509,8 @@ 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." + + "Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." ); } @@ -499,7 +518,8 @@ 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." + + "Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." ); } @@ -572,7 +592,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." + + "in a future release. See the deprecation documentation for the next major version." ); } 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 62af3d74410cc..5cd56f8f8b7ca 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 @@ -157,7 +157,10 @@ 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."); + assertWarnings( + "[keystore.password] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation documentation for the next major version." + ); } private void assertSameCertificate(String cert, Path original, char[] originalPassword, boolean isCa) throws Exception { diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/monitoring/bulk/10_basic.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/monitoring/bulk/10_basic.yml index 44fc75c57a16c..ca671a6ab30a0 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/monitoring/bulk/10_basic.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/monitoring/bulk/10_basic.yml @@ -5,7 +5,7 @@ - do: allowed_warnings: - - "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release." + - "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. See the deprecation documentation for the next major version." cluster.put_settings: body: persistent: @@ -176,7 +176,7 @@ - do: allowed_warnings: - - "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release." + - "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. See the deprecation documentation for the next major version." cluster.put_settings: body: persistent: diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/monitoring/bulk/20_privileges.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/monitoring/bulk/20_privileges.yml index 93e5c44b83e2a..c08084dddac14 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/monitoring/bulk/20_privileges.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/monitoring/bulk/20_privileges.yml @@ -80,7 +80,7 @@ teardown: - do: allowed_warnings: - - "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release." + - "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. See the deprecation documentation for the next major version." cluster.put_settings: body: persistent: