From b882a19524329571a110e78ed5793e6346a7cf71 Mon Sep 17 00:00:00 2001 From: alexey-ivanov-es Date: Thu, 23 Jan 2025 14:25:20 +0000 Subject: [PATCH 01/14] Change setting's deprecation message wording --- .../apm/internal/APMAgentSettingsTests.java | 39 ++++++++++---- .../s3/RepositoryCredentialsTests.java | 12 +++-- .../common/settings/Setting.java | 17 ++++-- .../cluster/ClusterModuleTests.java | 9 ++-- .../ClusterRebalanceRoutingTests.java | 3 +- .../routing/allocation/IndexBalanceTests.java | 3 +- .../allocation/ThrottlingAllocationTests.java | 3 +- .../index/codec/PerFieldMapperCodecTests.java | 3 +- .../InternalSnapshotsInfoServiceTests.java | 3 +- .../snapshots/SnapshotResiliencyTests.java | 3 +- .../TransportServiceLifecycleTests.java | 9 ++-- .../test/ESSingleNodeTestCase.java | 5 +- .../org/elasticsearch/test/ESTestCase.java | 3 +- .../xpack/deprecation/DeprecationHttpIT.java | 3 +- .../NodeDeprecationChecksTests.java | 24 ++++++--- .../xpack/enrich/EnrichPluginTests.java | 5 +- .../enrich/EnrichStatsCollectorTests.java | 2 +- .../xpack/TimeSeriesRestDriver.java | 3 +- ...onitoringHistoryDurationSettingsTests.java | 9 ++-- .../monitoring/MonitoringServiceTests.java | 9 ++-- .../cleaner/CleanerServiceTests.java | 6 ++- .../indices/IndexRecoveryCollectorTests.java | 3 +- .../shards/ShardsCollectorTests.java | 3 +- .../monitoring/exporter/ExportersTests.java | 6 ++- .../exporter/http/HttpExporterTests.java | 54 ++++++++++++------- .../TransportNodeEnrollmentActionTests.java | 5 +- .../test/monitoring/bulk/10_basic.yml | 6 ++- .../test/monitoring/bulk/20_privileges.yml | 3 +- 28 files changed, 175 insertions(+), 78 deletions(-) diff --git a/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java b/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java index a60048c82a3c9..1c50e2c2d0c49 100644 --- a/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java +++ b/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java @@ -75,7 +75,10 @@ public void testEnableTracingUsingLegacySetting() { apmAgentSettings.initAgentSystemProperties(settings); verify(apmAgentSettings).setAgentSetting("recording", "true"); - assertWarnings("[tracing.apm.enabled] setting was deprecated in Elasticsearch and will be removed in a future release."); + assertWarnings( + "[tracing.apm.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation changes documentation for the next major version." + ); } public void testEnableMetrics() { @@ -126,7 +129,10 @@ public void testDisableTracingUsingLegacySetting() { apmAgentSettings.initAgentSystemProperties(settings); verify(apmAgentSettings).setAgentSetting("recording", "false"); - assertWarnings("[tracing.apm.enabled] setting was deprecated in Elasticsearch and will be removed in a future release."); + assertWarnings( + "[tracing.apm.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation changes documentation for the next major version." + ); } public void testDisableMetrics() { @@ -191,7 +197,8 @@ public void testSetAgentsSettingsWithLegacyPrefix() { verify(apmAgentSettings).setAgentSetting("recording", "true"); verify(apmAgentSettings).setAgentSetting("span_compression_enabled", "true"); assertWarnings( - "[tracing.apm.agent.span_compression_enabled] setting was deprecated in Elasticsearch and will be removed in a future release." + "[tracing.apm.agent.span_compression_enabled] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation changes documentation for the next major version." ); } @@ -212,7 +219,8 @@ public void testRejectForbiddenOrUnknownAgentSettings() { if (prefix.startsWith("tracing.apm.agent.")) { assertWarnings( - "[tracing.apm.agent.global_labels.abc] setting was deprecated in Elasticsearch and will be removed in a future release." + "[tracing.apm.agent.global_labels.abc] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation changes documentation for the next major version." ); } } @@ -224,7 +232,10 @@ public void testTelemetryTracingNamesIncludeFallback() { List included = TELEMETRY_TRACING_NAMES_INCLUDE_SETTING.get(settings); assertThat(included, containsInAnyOrder("abc", "xyz")); - assertWarnings("[tracing.apm.names.include] setting was deprecated in Elasticsearch and will be removed in a future release."); + assertWarnings( + "[tracing.apm.names.include] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation changes documentation for the next major version." + ); } public void testTelemetryTracingNamesExcludeFallback() { @@ -233,7 +244,10 @@ public void testTelemetryTracingNamesExcludeFallback() { List included = TELEMETRY_TRACING_NAMES_EXCLUDE_SETTING.get(settings); assertThat(included, containsInAnyOrder("abc", "xyz")); - assertWarnings("[tracing.apm.names.exclude] setting was deprecated in Elasticsearch and will be removed in a future release."); + assertWarnings( + "[tracing.apm.names.exclude] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation changes documentation for the next major version." + ); } public void testTelemetryTracingSanitizeFieldNamesFallback() { @@ -243,7 +257,8 @@ public void testTelemetryTracingSanitizeFieldNamesFallback() { assertThat(included, containsInAnyOrder("abc", "xyz")); assertWarnings( - "[tracing.apm.sanitize_field_names] setting was deprecated in Elasticsearch and will be removed in a future release." + "[tracing.apm.sanitize_field_names] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation changes documentation for the next major version." ); } @@ -260,7 +275,10 @@ public void testTelemetrySecretTokenFallback() { try (SecureString secureString = TELEMETRY_SECRET_TOKEN_SETTING.get(settings)) { assertEquals("verysecret", secureString.toString()); } - assertWarnings("[tracing.apm.secret_token] setting was deprecated in Elasticsearch and will be removed in a future release."); + assertWarnings( + "[tracing.apm.secret_token] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation changes documentation for the next major version." + ); } public void testTelemetryApiKeyFallback() { @@ -271,7 +289,10 @@ public void testTelemetryApiKeyFallback() { try (SecureString secureString = TELEMETRY_API_KEY_SETTING.get(settings)) { assertEquals("abc", secureString.toString()); } - assertWarnings("[tracing.apm.api_key] setting was deprecated in Elasticsearch and will be removed in a future release."); + assertWarnings( + "[tracing.apm.api_key] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation changes documentation for the next major version." + ); } /** 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..0d3800e7c7aba 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 deprecation changes documentation for the next major version.", + "[secret_key] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation 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 deprecation changes documentation for the next major version.", + "[secret_key] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation 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..6df356b68ab18 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 changes documentation for the next major version."; + private static final String DEPRECATED_WARN_MESSAGE = String.format(Locale.ROOT, DEPRECATED_MESSAGE_TEMPLATE, "deprecation"); + private static final String DEPRECATED_CRITICAL_MESSAGE = String.format(Locale.ROOT, DEPRECATED_MESSAGE_TEMPLATE, "breaking"); 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..6cbe92a3142b5 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 deprecation 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 deprecation 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 deprecation 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..633ec5e81bb2f 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 deprecation 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..41fb56f78074c 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 deprecation 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..fc44ddfda2151 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 deprecation 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..f119b5ace6ba4 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 changes 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..1f4d663b250ea 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 deprecation 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 061151a24c455..209c19964d378 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 deprecation 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..6b235fabe6858 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 deprecation 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 deprecation 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 deprecation 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..349437cd1d878 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 changes 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 a271c999a2ba7..dff660b72b6af 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java @@ -683,7 +683,8 @@ 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.", + "[%s] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation changes documentation for the next major version.", setting.getKey() ); return new DeprecationWarning( 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..d039c31cd7ac1 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 changes 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 7fe2be2736ea8..bd6400e3a504a 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 @@ -596,7 +596,8 @@ 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." + "[script.context.score.max_compilations_rate] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation changes documentation for the next major version." ); } @@ -633,7 +634,8 @@ 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." + "[script.context.filter.cache_max_size] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation changes documentation for the next major version." ); } @@ -669,8 +671,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 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 deprecation changes documentation for the next major version." ); } @@ -706,8 +710,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.moving-function.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 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 deprecation changes documentation for the next major version." ); } @@ -764,7 +770,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 changes documentation for the next major version." ) ); } @@ -786,7 +793,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 changes 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..abf07ee281ef5 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 deprecation 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..7d8efa3711757 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 changes 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 a1c7ebc2d8b2c..6a66d8e9a1b77 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 changes 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..fafe37b6567fb 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 changes 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 changes 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 changes 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..6753449e70a63 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 changes 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 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 deprecation changes 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..b2b2cb3b3936a 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 changes 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 changes 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..9fbf2e4f90c60 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,7 +171,8 @@ public void testDoCollect() throws Exception { + "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.", - "[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 changes 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..631a83146b993 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 changes 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..d711de1122c5f 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 @@ -295,8 +295,10 @@ 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 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 deprecation changes 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.", "[xpack.monitoring.exporters._name1.cluster_alerts.management.blacklist] setting was deprecated in Elasticsearch and will " 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..798a792e23dd8 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 @@ -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 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 deprecation changes documentation for the next major version." ); } @@ -180,7 +182,8 @@ 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 changes 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." ); @@ -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 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 deprecation changes 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 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 deprecation changes 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 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 deprecation changes 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 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 deprecation changes 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 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 deprecation changes 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 changes 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 changes documentation for the next major version." ); // use basic auth @@ -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 changes documentation for the next major version." ); } @@ -475,8 +491,10 @@ 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." + "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the deprecation 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 deprecation changes documentation for the next major version." ); } 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 c85684a60e449..6a632c767c533 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 changes 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..6d1ba05424675 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,8 @@ - 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 changes documentation for the next major version." cluster.put_settings: body: persistent: @@ -176,7 +177,8 @@ - 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 changes 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..87694680dd9a8 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,8 @@ 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 changes documentation for the next major version." cluster.put_settings: body: persistent: From f547955e1e7521f130282e74a50e965761a205d1 Mon Sep 17 00:00:00 2001 From: alexey-ivanov-es Date: Thu, 23 Jan 2025 14:47:50 +0000 Subject: [PATCH 02/14] Fix checkstyle --- .../telemetry/apm/internal/APMAgentSettingsTests.java | 4 ++-- .../xpack/deprecation/NodeDeprecationChecksTests.java | 4 ++-- .../resources/rest-api-spec/test/monitoring/bulk/10_basic.yml | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java b/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java index 1c50e2c2d0c49..ac75a1a17a1e6 100644 --- a/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java +++ b/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java @@ -219,8 +219,8 @@ public void testRejectForbiddenOrUnknownAgentSettings() { if (prefix.startsWith("tracing.apm.agent.")) { assertWarnings( - "[tracing.apm.agent.global_labels.abc] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + "[tracing.apm.agent.global_labels.abc] setting was deprecated in Elasticsearch and will be removed in a future release." + + " See the deprecation changes documentation for the next major version." ); } } 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 bd6400e3a504a..82b193f7a44f7 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 @@ -712,8 +712,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 deprecation 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 deprecation 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 deprecation changes documentation for the next major version." ); } 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 6d1ba05424675..49d6c5126d7b6 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,8 +5,7 @@ - do: allowed_warnings: - - "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. " + - "See the deprecation changes documentation for the next major version." + - "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. See the deprecation changes documentation for the next major version." cluster.put_settings: body: persistent: From 78155a064dfcc6728b73df2497e71d26e4d5db5f Mon Sep 17 00:00:00 2001 From: alexey-ivanov-es Date: Thu, 23 Jan 2025 14:49:28 +0000 Subject: [PATCH 03/14] Fix yaml files --- .../resources/rest-api-spec/test/monitoring/bulk/10_basic.yml | 3 +-- .../rest-api-spec/test/monitoring/bulk/20_privileges.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) 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 49d6c5126d7b6..1b227840ea5bf 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 @@ -176,8 +176,7 @@ - do: allowed_warnings: - - "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. " + - "See the deprecation changes documentation for the next major version." + - "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. See the deprecation changes 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 87694680dd9a8..d81b648fac5d2 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,8 +80,7 @@ teardown: - do: allowed_warnings: - - "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. " + - "See the deprecation changes documentation for the next major version." + - "[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. See the deprecation changes documentation for the next major version." cluster.put_settings: body: persistent: From b4c25e7e9cff13a653bde0e822871a4d95912aec Mon Sep 17 00:00:00 2001 From: alexey-ivanov-es Date: Thu, 23 Jan 2025 15:33:07 +0000 Subject: [PATCH 04/14] Fix tests --- .../collecting-monitoring-data.asciidoc | 2 +- .../snapshot-restore/restore-snapshot.asciidoc | 4 ++-- .../apm/internal/APMAgentSettingsTests.java | 18 +++++++++--------- .../cluster/ClusterModuleTests.java | 6 +++--- .../ClusterRebalanceRoutingTests.java | 2 +- .../routing/allocation/IndexBalanceTests.java | 2 +- .../allocation/ThrottlingAllocationTests.java | 2 +- .../snapshots/SnapshotResiliencyTests.java | 2 +- .../TransportServiceLifecycleTests.java | 4 ++-- .../collector/ccr/StatsCollectorTests.java | 2 +- .../NodeDeprecationChecksTests.java | 4 ++-- .../xpack/enrich/EnrichPluginTests.java | 2 +- 12 files changed, 25 insertions(+), 25 deletions(-) diff --git a/docs/reference/monitoring/collecting-monitoring-data.asciidoc b/docs/reference/monitoring/collecting-monitoring-data.asciidoc index 3fbc7b0d5a616..7685124fc5a90 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.] +// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. See the deprecation changes documentation for the next major version.] 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/snapshot-restore/restore-snapshot.asciidoc b/docs/reference/snapshot-restore/restore-snapshot.asciidoc index b853354c578b6..960d62f650712 100644 --- a/docs/reference/snapshot-restore/restore-snapshot.asciidoc +++ b/docs/reference/snapshot-restore/restore-snapshot.asciidoc @@ -343,7 +343,7 @@ PUT _cluster/settings } } ---- -// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release.] +// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. See the deprecation changes documentation for the next major version.] * Watcher + @@ -492,7 +492,7 @@ PUT _cluster/settings } } ---- -// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release.] +// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. See the deprecation changes documentation for the next major version.] // TEST[s/true/false/] * Watcher diff --git a/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java b/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java index ac75a1a17a1e6..7ae934ee3c7c8 100644 --- a/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java +++ b/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java @@ -77,7 +77,7 @@ public void testEnableTracingUsingLegacySetting() { verify(apmAgentSettings).setAgentSetting("recording", "true"); assertWarnings( "[tracing.apm.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the breaking changes documentation for the next major version." ); } @@ -131,7 +131,7 @@ public void testDisableTracingUsingLegacySetting() { verify(apmAgentSettings).setAgentSetting("recording", "false"); assertWarnings( "[tracing.apm.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the breaking changes documentation for the next major version." ); } @@ -198,7 +198,7 @@ public void testSetAgentsSettingsWithLegacyPrefix() { verify(apmAgentSettings).setAgentSetting("span_compression_enabled", "true"); assertWarnings( "[tracing.apm.agent.span_compression_enabled] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the breaking changes documentation for the next major version." ); } @@ -220,7 +220,7 @@ public void testRejectForbiddenOrUnknownAgentSettings() { if (prefix.startsWith("tracing.apm.agent.")) { assertWarnings( "[tracing.apm.agent.global_labels.abc] setting was deprecated in Elasticsearch and will be removed in a future release." - + " See the deprecation changes documentation for the next major version." + + " See the breaking changes documentation for the next major version." ); } } @@ -234,7 +234,7 @@ public void testTelemetryTracingNamesIncludeFallback() { assertThat(included, containsInAnyOrder("abc", "xyz")); assertWarnings( "[tracing.apm.names.include] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the breaking changes documentation for the next major version." ); } @@ -246,7 +246,7 @@ public void testTelemetryTracingNamesExcludeFallback() { assertThat(included, containsInAnyOrder("abc", "xyz")); assertWarnings( "[tracing.apm.names.exclude] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the breaking changes documentation for the next major version." ); } @@ -258,7 +258,7 @@ public void testTelemetryTracingSanitizeFieldNamesFallback() { assertThat(included, containsInAnyOrder("abc", "xyz")); assertWarnings( "[tracing.apm.sanitize_field_names] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the breaking changes documentation for the next major version." ); } @@ -277,7 +277,7 @@ public void testTelemetrySecretTokenFallback() { } assertWarnings( "[tracing.apm.secret_token] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the breaking changes documentation for the next major version." ); } @@ -291,7 +291,7 @@ public void testTelemetryApiKeyFallback() { } assertWarnings( "[tracing.apm.api_key] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the breaking changes documentation for the next major version." ); } diff --git a/server/src/test/java/org/elasticsearch/cluster/ClusterModuleTests.java b/server/src/test/java/org/elasticsearch/cluster/ClusterModuleTests.java index 6cbe92a3142b5..3d65b48663972 100644 --- a/server/src/test/java/org/elasticsearch/cluster/ClusterModuleTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/ClusterModuleTests.java @@ -190,7 +190,7 @@ public void testRegisterShardsAllocator() { assertEquals(FakeShardsAllocator.class, module.shardsAllocator.getClass()); assertCriticalWarnings( "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the breaking changes documentation for the next major version." ); } @@ -221,7 +221,7 @@ 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. " - + "See the deprecation changes documentation for the next major version." + + "See the breaking changes documentation for the next major version." ); } @@ -230,7 +230,7 @@ public void testShardsAllocatorFactoryNull() { 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. " - + "See the deprecation changes documentation for the next major version." + + "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 633ec5e81bb2f..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 @@ -705,7 +705,7 @@ public void beforeAllocation(RoutingAllocation allocation) { ); assertCriticalWarnings( "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "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 41fb56f78074c..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 @@ -450,7 +450,7 @@ 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. " - + "See the deprecation changes documentation for the next major version." + + "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 fc44ddfda2151..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 @@ -201,7 +201,7 @@ public void testThrottleIncomingAndOutgoing() { ); assertCriticalWarnings( "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "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/snapshots/SnapshotResiliencyTests.java b/server/src/test/java/org/elasticsearch/snapshots/SnapshotResiliencyTests.java index 209c19964d378..d74f3fa69df21 100644 --- a/server/src/test/java/org/elasticsearch/snapshots/SnapshotResiliencyTests.java +++ b/server/src/test/java/org/elasticsearch/snapshots/SnapshotResiliencyTests.java @@ -2203,7 +2203,7 @@ public RecyclerBytesStreamOutput newNetworkBytesStream() { ); assertCriticalWarnings( "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "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 6b235fabe6858..9801bb6316427 100644 --- a/server/src/test/java/org/elasticsearch/transport/TransportServiceLifecycleTests.java +++ b/server/src/test/java/org/elasticsearch/transport/TransportServiceLifecycleTests.java @@ -172,7 +172,7 @@ public void testInternalSendExceptionForksToGenericIfHandlerDoesNotForkAndStackO } assertWarnings( "[transport.enable_stack_protection] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the breaking changes documentation for the next major version." ); } @@ -279,7 +279,7 @@ public void testOnConnectionCloseStackOverflowAvoidance() { ); assertWarnings( "[transport.enable_stack_protection] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the breaking changes documentation for the next major version." ); } 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..7a053b0cd8339 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 changes documentation for the next major version." ); } 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 82b193f7a44f7..7fdab6b0b3782 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 @@ -595,7 +595,7 @@ public void testScriptContextCompilationsRateLimitSetting() { assertWarnings( "[script.context.field.max_compilations_rate] setting was deprecated in Elasticsearch and will be" - + " removed in a future release.", + + " removed in a future release. See the deprecation 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 deprecation changes documentation for the next major version." ); @@ -633,7 +633,7 @@ public void testImplicitScriptContextCacheSetting() { assertWarnings( "[script.context.update.max_compilations_rate] setting was deprecated in Elasticsearch and will be" - + " removed in a future release.", + + " removed in a future release. See the deprecation 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 deprecation changes 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 abf07ee281ef5..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 @@ -55,7 +55,7 @@ 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. " - + "See the deprecation changes documentation for the next major version." + + "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." From a4c86c7f02c16d304b4a756a7f0b4529c4508aa4 Mon Sep 17 00:00:00 2001 From: alexey-ivanov-es Date: Thu, 23 Jan 2025 17:09:07 +0000 Subject: [PATCH 05/14] Fix tests --- .../restore-snapshot.asciidoc | 2 +- .../TransportServiceLifecycleTests.java | 2 +- .../cluster/ClusterStatsCollectorTests.java | 6 ++--- .../indices/IndexRecoveryCollectorTests.java | 6 ++--- .../indices/IndexStatsCollectorTests.java | 4 ++-- .../collector/ml/JobStatsCollectorTests.java | 4 ++-- .../node/NodeStatsCollectorTests.java | 6 ++--- .../exporter/ClusterAlertsUtilTests.java | 4 ++-- .../monitoring/exporter/ExportersTests.java | 12 +++++----- .../http/HttpExporterResourceTests.java | 6 ++--- .../exporter/http/HttpExporterTests.java | 24 ++++++++++--------- 11 files changed, 39 insertions(+), 37 deletions(-) diff --git a/docs/reference/snapshot-restore/restore-snapshot.asciidoc b/docs/reference/snapshot-restore/restore-snapshot.asciidoc index 960d62f650712..e3152b15d76b0 100644 --- a/docs/reference/snapshot-restore/restore-snapshot.asciidoc +++ b/docs/reference/snapshot-restore/restore-snapshot.asciidoc @@ -492,7 +492,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 deprecation 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. See the deprecation changes documentation for the next major version.] // TEST[s/true/false/] * Watcher diff --git a/server/src/test/java/org/elasticsearch/transport/TransportServiceLifecycleTests.java b/server/src/test/java/org/elasticsearch/transport/TransportServiceLifecycleTests.java index 9801bb6316427..5eeb6f65a03bb 100644 --- a/server/src/test/java/org/elasticsearch/transport/TransportServiceLifecycleTests.java +++ b/server/src/test/java/org/elasticsearch/transport/TransportServiceLifecycleTests.java @@ -266,7 +266,7 @@ public void testOnConnectionClosedUsesHandlerExecutor() { if (withSetting) { assertWarnings( "[transport.enable_stack_protection] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the breaking changes 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..0dc855209ee4f 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 changes 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 changes 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 changes 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 9fbf2e4f90c60..acf3c41d1851f 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,9 +168,9 @@ 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 changes 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.", + + "in a future release. See the deprecation 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 deprecation changes documentation for the next major version." ); @@ -228,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 changes 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..c705c9343ec50 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 changes 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 changes 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..edcb96b9fc227 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 changes 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 changes 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..f65a31dd73450 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 changes 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 changes 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 changes 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..819e4d2dd50ba 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 changes 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 changes 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 d711de1122c5f..89573f820a142 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 changes 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 changes 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 changes documentation for the next major version." ); } @@ -300,9 +300,9 @@ InitializedExporters initExporters(Settings settings) { "[xpack.monitoring.exporters._name0.type] setting was deprecated in Elasticsearch and will be removed in a future release. " + "See the deprecation changes 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 changes 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 changes documentation for the next major version." ); } @@ -349,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 changes 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..e823ba70c9704 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 changes 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 changes 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 changes 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 798a792e23dd8..de6e95861beb5 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 changes 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 changes 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 changes documentation for the next major version." ); } @@ -185,7 +185,7 @@ public void testSecurePasswordIsRejectedIfTypeIsNotHttp() { "[xpack.monitoring.exporters.example.type] setting was deprecated in Elasticsearch and will be removed in a future release. " + "See the deprecation changes 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 changes documentation for the next major version." ); } @@ -334,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 changes 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 changes documentation for the next major version." ); } @@ -384,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 changes documentation for the next major version." ); } @@ -490,7 +490,7 @@ 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.", + + "in a future release. See the deprecation 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 deprecation 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. " @@ -509,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 changes documentation for the next major version." ); } @@ -517,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 changes documentation for the next major version." ); } @@ -590,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 changes documentation for the next major version." ); } else { assertNull(parameters.remove("timeout")); From 7042d742e53eec15e3fa1905cf715bd60a262c04 Mon Sep 17 00:00:00 2001 From: alexey-ivanov-es Date: Fri, 24 Jan 2025 12:56:18 +0000 Subject: [PATCH 06/14] Fix tests --- .../src/main/java/org/elasticsearch/test/ESTestCase.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 dff660b72b6af..6532bb9fb37b4 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java @@ -681,14 +681,16 @@ protected List filteredWarnings() { */ protected final void assertSettingDeprecationsAndWarnings(final Setting[] settings, final DeprecationWarning... warnings) { assertWarnings(true, Stream.concat(Arrays.stream(settings).map(setting -> { + Level level = setting.getProperties().contains(Setting.Property.Deprecated) ? DeprecationLogger.CRITICAL : Level.WARN; String warningMessage = String.format( Locale.ROOT, "[%s] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version.", - setting.getKey() + + "See the %s changes documentation for the next major version.", + setting.getKey(), + (level == Level.WARN) ? "deprecation" : "breaking" ); return new DeprecationWarning( - setting.getProperties().contains(Setting.Property.Deprecated) ? DeprecationLogger.CRITICAL : Level.WARN, + level, warningMessage ); }), Arrays.stream(warnings)).toArray(DeprecationWarning[]::new)); From 7be8f49982e89dd9f94211981dfd7c5c35ca8e70 Mon Sep 17 00:00:00 2001 From: elasticsearchmachine Date: Fri, 24 Jan 2025 13:03:06 +0000 Subject: [PATCH 07/14] [CI] Auto commit changes from spotless --- .../src/main/java/org/elasticsearch/test/ESTestCase.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 6532bb9fb37b4..f82c4fc4eb0c1 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java @@ -689,10 +689,7 @@ protected final void assertSettingDeprecationsAndWarnings(final Setting[] set setting.getKey(), (level == Level.WARN) ? "deprecation" : "breaking" ); - return new DeprecationWarning( - level, - warningMessage - ); + return new DeprecationWarning(level, warningMessage); }), Arrays.stream(warnings)).toArray(DeprecationWarning[]::new)); } From 283c86ad72016ec7b399890e0854372d382cf5c7 Mon Sep 17 00:00:00 2001 From: alexey-ivanov-es Date: Fri, 24 Jan 2025 15:09:17 +0000 Subject: [PATCH 08/14] Fix test --- .../xpack/monitoring/exporter/http/HttpExporterTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 de6e95861beb5..dc4e97f5d921a 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 @@ -415,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 changes documentation for the next major version." ); } From 9d5d6ab40efe5c07d61dc2c3695875391a78ff4e Mon Sep 17 00:00:00 2001 From: alexey-ivanov-es Date: Fri, 24 Jan 2025 16:11:15 +0000 Subject: [PATCH 09/14] Fix test --- .../snapshots/InternalSnapshotsInfoServiceTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/snapshots/InternalSnapshotsInfoServiceTests.java b/server/src/test/java/org/elasticsearch/snapshots/InternalSnapshotsInfoServiceTests.java index 1f4d663b250ea..b15e2970927ef 100644 --- a/server/src/test/java/org/elasticsearch/snapshots/InternalSnapshotsInfoServiceTests.java +++ b/server/src/test/java/org/elasticsearch/snapshots/InternalSnapshotsInfoServiceTests.java @@ -363,7 +363,7 @@ public IndexShardSnapshotStatus.Copy getShardSnapshotStatus(SnapshotId snapshotI ); assertCriticalWarnings( "[cluster.routing.allocation.type] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the breaking changes documentation for the next major version." ); applyClusterState( "starting shards for " + indexName, From 80e511694be67d1e51e82319d1c492844688ab6c Mon Sep 17 00:00:00 2001 From: alexey-ivanov-es Date: Fri, 24 Jan 2025 17:20:12 +0000 Subject: [PATCH 10/14] Fix test --- .../repositories/s3/RepositoryCredentialsTests.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 0d3800e7c7aba..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 @@ -108,9 +108,9 @@ public void testRepositoryCredentialsOverrideSecureCredentials() { assertCriticalWarnings( "[access_key] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version.", + + "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 deprecation changes documentation for the next major version.", + + "See the breaking changes documentation for the next major version.", S3Repository.INSECURE_CREDENTIALS_DEPRECATION_WARNING ); } @@ -196,9 +196,9 @@ public void testReinitSecureCredentials() { if (hasInsecureSettings) { assertCriticalWarnings( "[access_key] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version.", + + "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 deprecation changes documentation for the next major version.", + + "See the breaking changes documentation for the next major version.", S3Repository.INSECURE_CREDENTIALS_DEPRECATION_WARNING ); } From 2977e43c455302ba6303c3670cb0375fd15211a8 Mon Sep 17 00:00:00 2001 From: Alexey Ivanov Date: Mon, 27 Jan 2025 16:42:37 +0000 Subject: [PATCH 11/14] Remove a new line --- .../telemetry/apm/internal/APMAgentSettingsTests.java | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java b/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java index 295b046a33264..5516672420924 100644 --- a/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java +++ b/modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/APMAgentSettingsTests.java @@ -159,7 +159,6 @@ public void testSetAgentSettings() { * Check that invalid or forbidden APM agent settings are rejected. */ public void testRejectForbiddenOrUnknownAgentSettings() { - String prefix = APM_AGENT_SETTINGS.getKey(); Settings settings = Settings.builder().put(prefix + "unknown", "true").build(); Exception exception = expectThrows(IllegalArgumentException.class, () -> APM_AGENT_SETTINGS.getAsMap(settings)); From 65d76969ac927a555a5edd44acc9eb3de01ee55e Mon Sep 17 00:00:00 2001 From: alexey-ivanov-es Date: Fri, 7 Feb 2025 18:28:43 +0000 Subject: [PATCH 12/14] Revert asciidoc files --- docs/reference/monitoring/collecting-monitoring-data.asciidoc | 2 +- docs/reference/snapshot-restore/restore-snapshot.asciidoc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference/monitoring/collecting-monitoring-data.asciidoc b/docs/reference/monitoring/collecting-monitoring-data.asciidoc index 7685124fc5a90..3fbc7b0d5a616 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 deprecation 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/snapshot-restore/restore-snapshot.asciidoc b/docs/reference/snapshot-restore/restore-snapshot.asciidoc index e3152b15d76b0..b853354c578b6 100644 --- a/docs/reference/snapshot-restore/restore-snapshot.asciidoc +++ b/docs/reference/snapshot-restore/restore-snapshot.asciidoc @@ -343,7 +343,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 deprecation 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 + @@ -492,7 +492,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 deprecation 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 From 223c5cb68f7bd5ddfc83ca4aaf818917b8073c2d Mon Sep 17 00:00:00 2001 From: alexey-ivanov-es Date: Fri, 7 Mar 2025 13:13:34 +0000 Subject: [PATCH 13/14] Address review comments --- .../common/settings/Setting.java | 6 +- .../index/codec/PerFieldMapperCodecTests.java | 2 +- .../test/ESSingleNodeTestCase.java | 2 +- .../collector/ccr/StatsCollectorTests.java | 2 +- .../xpack/deprecation/DeprecationHttpIT.java | 2 +- .../NodeDeprecationChecksTests.java | 20 +++---- .../enrich/EnrichStatsCollectorTests.java | 2 +- .../xpack/TimeSeriesRestDriver.java | 2 +- ...onitoringHistoryDurationSettingsTests.java | 6 +- .../monitoring/MonitoringServiceTests.java | 6 +- .../cleaner/CleanerServiceTests.java | 4 +- .../cluster/ClusterStatsCollectorTests.java | 6 +- .../indices/IndexRecoveryCollectorTests.java | 8 +-- .../indices/IndexStatsCollectorTests.java | 4 +- .../collector/ml/JobStatsCollectorTests.java | 4 +- .../node/NodeStatsCollectorTests.java | 6 +- .../shards/ShardsCollectorTests.java | 2 +- .../exporter/ClusterAlertsUtilTests.java | 4 +- .../monitoring/exporter/ExportersTests.java | 16 ++--- .../http/HttpExporterResourceTests.java | 6 +- .../exporter/http/HttpExporterTests.java | 60 +++++++++---------- .../TransportNodeEnrollmentActionTests.java | 2 +- .../test/monitoring/bulk/10_basic.yml | 4 +- .../test/monitoring/bulk/20_privileges.yml | 2 +- 24 files changed, 89 insertions(+), 89 deletions(-) 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 7a3d42c932fd2..f592e107a2e3c 100644 --- a/server/src/main/java/org/elasticsearch/common/settings/Setting.java +++ b/server/src/main/java/org/elasticsearch/common/settings/Setting.java @@ -84,9 +84,9 @@ 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 changes documentation for the next major version."; - private static final String DEPRECATED_WARN_MESSAGE = String.format(Locale.ROOT, DEPRECATED_MESSAGE_TEMPLATE, "deprecation"); - private static final String DEPRECATED_CRITICAL_MESSAGE = String.format(Locale.ROOT, DEPRECATED_MESSAGE_TEMPLATE, "breaking"); + + "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 { /** 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 f119b5ace6ba4..02883f8317f9e 100644 --- a/server/src/test/java/org/elasticsearch/index/codec/PerFieldMapperCodecTests.java +++ b/server/src/test/java/org/elasticsearch/index/codec/PerFieldMapperCodecTests.java @@ -113,7 +113,7 @@ public void testUseBloomFilterWithTimestampFieldEnabled_disableBloomFilter() thr 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. " - + "See the deprecation changes documentation for the next major version." + + "See the deprecation 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 349437cd1d878..a786eaf4aca5f 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java @@ -236,7 +236,7 @@ protected List filteredWarnings() { super.filteredWarnings().stream(), Stream.of( "[index.data_path] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ) ).collect(Collectors.toList()); } 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 7a053b0cd8339..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. See the deprecation changes documentation for the next major version." + + "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 d039c31cd7ac1..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 @@ -131,7 +131,7 @@ 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. " - + "See the deprecation changes documentation for the next major version."; + + "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 b6ce648e9fc4c..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,9 +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. See the deprecation changes documentation for the next major version.", + + " 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 changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -629,9 +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. See the deprecation changes documentation for the next major version.", + + " 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 changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -668,9 +668,9 @@ 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 deprecation changes documentation for the next major version.", + + "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 changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -707,9 +707,9 @@ public void testScriptContextCacheExpirationSetting() { assertWarnings( "[script.context.interval.cache_expire] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version.", + + "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 changes documentation for the next major version." + + " See the deprecation documentation for the next major version." ); } @@ -767,7 +767,7 @@ public void testLifecyleStepMasterTimeoutSetting() { new DeprecationWarning( Level.WARN, "[indices.lifecycle.step.master_timeout] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ) ); } @@ -790,7 +790,7 @@ public void testEqlEnabledSetting() { new DeprecationWarning( Level.WARN, "[xpack.eql.enabled] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ) ); } 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 8487a66dec021..7cfa321f2da9e 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 @@ -149,7 +149,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 deprecation changes documentation for the next major version." + + "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 623174f8cf880..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 @@ -97,7 +97,7 @@ public static Map> explain(RestClient client, String .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. \ - See the deprecation changes documentation for the next major version.""").equals(warnings) == false) + 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 fafe37b6567fb..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 @@ -22,7 +22,7 @@ public void testHistoryDurationDefaults7Days() { 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 deprecation changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -34,7 +34,7 @@ public void testHistoryDurationMinimum24Hours() { ); assertWarnings( "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -47,7 +47,7 @@ public void testHistoryDurationMinimum24HoursBlocksLower() { ); assertWarnings( "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "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 6753449e70a63..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 @@ -111,7 +111,7 @@ public void testInterval() throws Exception { monitoringService.setMonitoringActive(false); assertWarnings( "[xpack.monitoring.collection.interval] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -137,9 +137,9 @@ 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 deprecation changes documentation for the next major version.", + + "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 changes documentation for the next major version." + + "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 b2b2cb3b3936a..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 @@ -60,7 +60,7 @@ public void testConstructorWithInvalidRetention() { } finally { assertWarnings( "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } } @@ -73,7 +73,7 @@ public void testGetRetention() { assertWarnings( "[xpack.monitoring.history.duration] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "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 0dc855209ee4f..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. See the deprecation changes documentation for the next major version." + + "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. See the deprecation changes documentation for the next major version." + + "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. See the deprecation changes documentation for the next major version." + + "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 acf3c41d1851f..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,11 +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. See the deprecation changes documentation for the next major version.", + + "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. See the deprecation changes documentation for the next major version.", + + "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 changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -228,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. See the deprecation changes documentation for the next major version." + + "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 88af7f1f53184..e54dc41ce948f 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. See the deprecation changes documentation for the next major version." + + "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. See the deprecation changes documentation for the next major version." + + "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 edcb96b9fc227..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. See the deprecation changes documentation for the next major version." + + "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. See the deprecation changes documentation for the next major version." + + "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 f65a31dd73450..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. See the deprecation changes documentation for the next major version." + + "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. See the deprecation changes documentation for the next major version." + + "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. See the deprecation changes documentation for the next major version." + + "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 631a83146b993..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 @@ -139,7 +139,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 deprecation changes documentation for the next major version." + + "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 819e4d2dd50ba..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. See the deprecation changes documentation for the next major version." + + "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. See the deprecation changes documentation for the next major version." + + "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 89573f820a142..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. See the deprecation changes documentation for the next major version." + + "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. See the deprecation changes documentation for the next major version." + + "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. See the deprecation changes documentation for the next major version." + + "future release. See the deprecation documentation for the next major version." ); } @@ -296,13 +296,13 @@ InitializedExporters initExporters(Settings settings) { assertWarnings( "[xpack.monitoring.exporters._name1.type] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version.", + + "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 changes documentation for the next major version.", + + "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. See the deprecation changes documentation for the next major version.", + + "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. See the deprecation changes documentation for the next major version." + + "be removed in a future release. See the deprecation documentation for the next major version." ); } @@ -349,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. See the deprecation changes documentation for the next major version." + + "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 e823ba70c9704..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. See the deprecation changes documentation for the next major version.", + + "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. See the deprecation changes documentation for the next major version." + + "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. See the deprecation changes documentation for the next major version." + + "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 dc4e97f5d921a..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. See the deprecation changes documentation for the next major version." + + "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. See the deprecation changes documentation for the next major version." + + "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. See the deprecation changes documentation for the next major version." + + "future release. See the deprecation documentation for the next major version." ); } @@ -157,9 +157,9 @@ public void testHostListIsRejectedIfTypeIsNotHttp() { 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 deprecation changes documentation for the next major version.", + + "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 changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -183,9 +183,9 @@ public void testSecurePasswordIsRejectedIfTypeIsNotHttp() { 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 deprecation changes documentation for the next major version.", + + "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. See the deprecation changes documentation for the next major version." + + "future release. See the deprecation documentation for the next major version." ); } @@ -204,9 +204,9 @@ public void testInvalidHost() { 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 deprecation changes documentation for the next major version.", + + "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 changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -232,9 +232,9 @@ public void testMixedSchemes() { 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 deprecation changes documentation for the next major version.", + + "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 changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -263,9 +263,9 @@ public void testExporterWithBlacklistedHeaders() { assertWarnings( "[xpack.monitoring.exporters._http.host] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version.", + + "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 changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -292,9 +292,9 @@ 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 deprecation changes documentation for the next major version.", + + "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 changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -334,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. See the deprecation changes documentation for the next major version.", + + " 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. See the deprecation changes documentation for the next major version." + + " and will be removed in a future release. See the deprecation documentation for the next major version." ); } @@ -354,9 +354,9 @@ 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 deprecation changes documentation for the next major version.", + + "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 changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -384,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. See the deprecation changes documentation for the next major version." + + "in a future release. See the deprecation documentation for the next major version." ); } @@ -399,11 +399,11 @@ public void testCreateRestClient() throws IOException { .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 deprecation changes documentation for the next major version." + + "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. " - + "See the deprecation changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); // use basic auth @@ -415,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. See the deprecation changes documentation for the next major version." + + "removed in a future release. See the deprecation documentation for the next major version." ); } @@ -447,7 +447,7 @@ public void testCreateCredentialsProviderWithoutSecurity() { assertWarnings( "[xpack.monitoring.exporters._http.type] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -490,11 +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. See the deprecation changes documentation for the next major version.", + + "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 changes documentation for the next major version.", + + "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 changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -510,7 +510,7 @@ public void testCreateResources() { 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 deprecation changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -519,7 +519,7 @@ public void testCreateResources() { 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 deprecation changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } @@ -592,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. See the deprecation changes documentation for the next major version." + + "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 6c164ddcad5e1..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 @@ -159,7 +159,7 @@ public void testDoExecute() throws Exception { assertWarnings( "[keystore.password] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the deprecation changes documentation for the next major version." + + "See the deprecation documentation for the next major version." ); } 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 1b227840ea5bf..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. See the deprecation changes documentation for the next major version." + - "[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. See the deprecation changes documentation for the next major version." + - "[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 d81b648fac5d2..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. See the deprecation changes documentation for the next major version." + - "[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: From bbbbfe5d927cb1acd146ae7edfe6d1d6307faa78 Mon Sep 17 00:00:00 2001 From: alexey-ivanov-es Date: Fri, 7 Mar 2025 13:31:24 +0000 Subject: [PATCH 14/14] Fix tests --- .../src/main/java/org/elasticsearch/test/ESTestCase.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 3435c45e1bb95..f1514b1c41ac6 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java @@ -702,12 +702,11 @@ protected List filteredWarnings() { protected final void assertSettingDeprecationsAndWarnings(final Setting[] settings, final DeprecationWarning... warnings) { assertWarnings(true, Stream.concat(Arrays.stream(settings).map(setting -> { Level level = setting.getProperties().contains(Setting.Property.Deprecated) ? DeprecationLogger.CRITICAL : Level.WARN; - String warningMessage = String.format( - Locale.ROOT, + String warningMessage = Strings.format( "[%s] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the %s changes documentation for the next major version.", + + "See the %s documentation for the next major version.", setting.getKey(), - (level == Level.WARN) ? "deprecation" : "breaking" + (level == Level.WARN) ? "deprecation" : "breaking changes" ); return new DeprecationWarning(level, warningMessage); }), Arrays.stream(warnings)).toArray(DeprecationWarning[]::new));