From 81bd8667cb5cec1f481d0af7b5969fd6c2591c3e Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 2 Oct 2024 11:37:14 +0100 Subject: [PATCH] Define owners for `UpdateForV9` annotations (#113926) In order to better track the work needed to prepare this branch for the major version upgrade, this commit adds a mandatory `owner` field to all `UpdateForV9` (and `UpdateForV10`) annotations. --- .../elasticsearch/core/RestApiVersion.java | 2 +- .../org/elasticsearch/core/UpdateForV10.java | 18 +++++++ .../org/elasticsearch/core/UpdateForV9.java | 18 +++++++ .../attachment/AttachmentProcessor.java | 3 +- .../ingest/geoip/FullClusterRestartIT.java | 2 +- .../legacygeo/GeoJsonShapeParserTests.java | 2 +- .../legacygeo/GeoWKTShapeParserTests.java | 6 +-- .../LegacyGeoShapeFieldMapperTests.java | 2 +- .../mapper/LegacyGeoShapeFieldTypeTests.java | 2 +- .../upgrades/FullClusterRestartIT.java | 8 +-- .../upgrades/QueryBuilderBWCIT.java | 2 +- .../upgrades/NodesCapabilitiesUpgradeIT.java | 2 +- .../test/rest/ClientYamlTestSuiteIT.java | 2 +- .../ReplicaShardAllocatorSyncIdIT.java | 2 +- .../mapping/MalformedDynamicTemplateIT.java | 2 +- .../repositories/IndexSnapshotsServiceIT.java | 2 +- .../org/elasticsearch/ReleaseVersions.java | 4 +- .../org/elasticsearch/TransportVersions.java | 4 +- .../main/java/org/elasticsearch/Version.java | 2 +- ...ransportGetFeatureUpgradeStatusAction.java | 4 +- .../TransportNodesCapabilitiesAction.java | 2 +- .../TransportNodesFeaturesAction.java | 2 +- .../snapshots/get/GetSnapshotsResponse.java | 2 +- .../stats/TransportClusterStatsAction.java | 2 +- .../action/bulk/BulkRequestParser.java | 2 +- .../elasticsearch/cluster/ClusterModule.java | 2 +- .../coordination/JoinValidationService.java | 2 +- .../features/NodeFeaturesFixupListener.java | 2 +- .../cluster/metadata/DesiredNode.java | 6 +-- .../allocation/DiskThresholdSettings.java | 2 +- .../allocator/BalancedShardsAllocator.java | 2 +- .../decider/DiskThresholdDecider.java | 2 +- .../TransportVersionsFixupListener.java | 2 +- .../common/settings/Setting.java | 4 +- .../common/time/DateFormatters.java | 2 +- .../org/elasticsearch/env/NodeMetadata.java | 6 +-- .../gateway/GatewayMetaState.java | 2 +- .../gateway/MetaStateService.java | 2 +- .../elasticsearch/index/IndexVersions.java | 4 +- .../elasticsearch/index/engine/Engine.java | 2 +- .../index/seqno/ReplicationTracker.java | 2 +- .../elasticsearch/node/NodeConstruction.java | 2 +- .../rest/RestCompatibleVersionHelper.java | 2 +- .../admin/indices/RestCloseIndexAction.java | 2 +- .../admin/indices/RestGetAliasesAction.java | 2 +- .../action/search/RestKnnSearchAction.java | 3 +- .../MovAvgPipelineAggregationBuilder.java | 2 +- .../elasticsearch/threadpool/ThreadPool.java | 4 +- .../transport/TransportStats.java | 6 ++- ...ortGetFeatureUpgradeStatusActionTests.java | 3 +- .../MetadataCreateIndexServiceTests.java | 2 +- .../cluster/metadata/MetadataTests.java | 8 +-- .../CompatibleNamedXContentRegistryTests.java | 2 +- .../env/NodeEnvironmentTests.java | 4 +- .../elasticsearch/env/NodeMetadataTests.java | 4 +- .../index/IndexVersionTests.java | 4 +- .../index/mapper/ParametrizedMapperTests.java | 2 +- .../indices/IndicesModuleTests.java | 2 +- .../AbstractSnapshotIntegTestCase.java | 2 +- .../test/rest/ESRestTestCase.java | 2 +- .../test/rest/RestTestLegacyFeatures.java | 50 +++++++++---------- .../test/transport/MockTransportService.java | 2 +- .../rest/yaml/ESClientYamlSuiteTestCase.java | 2 +- .../test/rest/yaml/section/DoSection.java | 4 +- .../yaml/section/PrerequisiteSection.java | 2 +- .../rest/yaml/section/DoSectionTests.java | 2 +- .../action/AutoFollowCoordinatorTests.java | 2 +- .../elasticsearch/xpack/core/ilm/Phase.java | 2 +- .../settings/GetSecuritySettingsAction.java | 2 +- .../UpdateSecuritySettingsAction.java | 2 +- .../put/UpdateWatcherSettingsAction.java | 2 +- .../NodesDeprecationCheckAction.java | 2 +- .../application/FullClusterRestartIT.java | 2 +- .../rest/action/RestFreezeIndexAction.java | 2 +- .../TransportTrainedModelCacheInfoAction.java | 2 +- .../RestDeleteTrainedModelAction.java | 2 +- .../inference/RestGetTrainedModelsAction.java | 2 +- .../RestGetTrainedModelsStatsAction.java | 2 +- ...RestInferTrainedModelDeploymentAction.java | 3 +- .../inference/RestPutTrainedModelAction.java | 2 +- .../xpack/ml/rest/job/RestPostDataAction.java | 3 +- .../bwc/codecs/OldCodecsAvailableTests.java | 2 +- .../xpack/profiling/action/CO2Calculator.java | 2 +- .../action/GetFlamegraphResponse.java | 6 +-- .../action/GetStackTracesRequest.java | 4 +- .../action/GetStackTracesResponse.java | 4 +- .../xpack/profiling/action/HostMetadata.java | 3 +- .../xpack/profiling/action/InstanceType.java | 2 +- .../xpack/profiling/action/SubGroup.java | 2 +- ...chableSnapshotEnableAllocationDecider.java | 3 +- .../cache/blob/CachedBlob.java | 3 +- ...bleSnapshotIndexMetadataUpgraderTests.java | 2 +- ...tyImplicitBehaviorBootstrapCheckTests.java | 4 +- .../xpack/restart/FullClusterRestartIT.java | 2 +- .../SnapshotsRecoveryPlannerServiceTests.java | 4 +- ...BoxQueryLegacyGeoShapeWithDocValuesIT.java | 2 +- .../search/LegacyGeoShapeWithDocValuesIT.java | 2 +- ...GeoShapeWithDocValuesFieldMapperTests.java | 2 +- ...LegacyGeoShapeWithDocValuesQueryTests.java | 2 +- .../rest/RestFindStructureAction.java | 2 +- .../xpack/restart/FullClusterRestartIT.java | 12 ++--- ...MLModelDeploymentFullClusterRestartIT.java | 2 +- .../xpack/restart/WatcherMappingUpdateIT.java | 3 +- .../upgrades/AbstractUpgradeTestCase.java | 2 +- .../upgrades/MLModelDeploymentsUpgradeIT.java | 4 +- .../MlAssignmentPlannerUpgradeIT.java | 2 +- 106 files changed, 210 insertions(+), 163 deletions(-) diff --git a/libs/core/src/main/java/org/elasticsearch/core/RestApiVersion.java b/libs/core/src/main/java/org/elasticsearch/core/RestApiVersion.java index 387d05db8444..672090d195c5 100644 --- a/libs/core/src/main/java/org/elasticsearch/core/RestApiVersion.java +++ b/libs/core/src/main/java/org/elasticsearch/core/RestApiVersion.java @@ -22,7 +22,7 @@ public enum RestApiVersion { V_8(8), - @UpdateForV9 // remove all references to V_7 then delete this annotation + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // remove all references to V_7 then delete this annotation V_7(7); public final byte major; diff --git a/libs/core/src/main/java/org/elasticsearch/core/UpdateForV10.java b/libs/core/src/main/java/org/elasticsearch/core/UpdateForV10.java index e4196f6b7c99..2f298cb38c0f 100644 --- a/libs/core/src/main/java/org/elasticsearch/core/UpdateForV10.java +++ b/libs/core/src/main/java/org/elasticsearch/core/UpdateForV10.java @@ -21,4 +21,22 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target({ ElementType.LOCAL_VARIABLE, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.TYPE }) public @interface UpdateForV10 { + enum Owner { + CORE_INFRA, + DATA_MANAGEMENT, + DISTRIBUTED_COORDINATION, + DISTRIBUTED_INDEXING, + ENTERPRISE_SEARCH, + MACHINE_LEARNING, + PROFILING, + SEARCH_ANALYTICS, + SEARCH_FOUNDATIONS, + SEARCH_RELEVANCE, + SECURITY, + } + + /** + * The owning team of the task to act on this annotation when the time comes. + */ + Owner owner(); } diff --git a/libs/core/src/main/java/org/elasticsearch/core/UpdateForV9.java b/libs/core/src/main/java/org/elasticsearch/core/UpdateForV9.java index 2d0ed12467bb..656e9ac66412 100644 --- a/libs/core/src/main/java/org/elasticsearch/core/UpdateForV9.java +++ b/libs/core/src/main/java/org/elasticsearch/core/UpdateForV9.java @@ -21,4 +21,22 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target({ ElementType.LOCAL_VARIABLE, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.TYPE }) public @interface UpdateForV9 { + enum Owner { + CORE_INFRA, + DATA_MANAGEMENT, + DISTRIBUTED_COORDINATION, + DISTRIBUTED_INDEXING, + ENTERPRISE_SEARCH, + MACHINE_LEARNING, + PROFILING, + SEARCH_ANALYTICS, + SEARCH_FOUNDATIONS, + SEARCH_RELEVANCE, + SECURITY, + } + + /** + * The owning team of the task to act on this annotation when the time comes. + */ + Owner owner(); } diff --git a/modules/ingest-attachment/src/main/java/org/elasticsearch/ingest/attachment/AttachmentProcessor.java b/modules/ingest-attachment/src/main/java/org/elasticsearch/ingest/attachment/AttachmentProcessor.java index e3b5dd00912e..007fe39d72e6 100644 --- a/modules/ingest-attachment/src/main/java/org/elasticsearch/ingest/attachment/AttachmentProcessor.java +++ b/modules/ingest-attachment/src/main/java/org/elasticsearch/ingest/attachment/AttachmentProcessor.java @@ -241,7 +241,8 @@ public final class AttachmentProcessor extends AbstractProcessor { int indexedChars = readIntProperty(TYPE, processorTag, config, "indexed_chars", NUMBER_OF_CHARS_INDEXED); boolean ignoreMissing = readBooleanProperty(TYPE, processorTag, config, "ignore_missing", false); String indexedCharsField = readOptionalStringProperty(TYPE, processorTag, config, "indexed_chars_field"); - @UpdateForV9 // update the [remove_binary] default to be 'true' assuming enough time has passed. Deprecated in September 2022. + @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) + // update the [remove_binary] default to be 'true' assuming enough time has passed. Deprecated in September 2022. Boolean removeBinary = readOptionalBooleanProperty(TYPE, processorTag, config, "remove_binary"); if (removeBinary == null) { DEPRECATION_LOGGER.warn( diff --git a/modules/ingest-geoip/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/ingest/geoip/FullClusterRestartIT.java b/modules/ingest-geoip/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/ingest/geoip/FullClusterRestartIT.java index 5a55a6affdd4..392d97321e38 100644 --- a/modules/ingest-geoip/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/ingest/geoip/FullClusterRestartIT.java +++ b/modules/ingest-geoip/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/ingest/geoip/FullClusterRestartIT.java @@ -34,7 +34,7 @@ import java.util.concurrent.TimeUnit; import static org.hamcrest.Matchers.contains; -@UpdateForV9 +@UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) @LuceneTestCase.AwaitsFix(bugUrl = "we need to figure out the index migrations here for 9.0") public class FullClusterRestartIT extends ParameterizedFullClusterRestartTestCase { diff --git a/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/GeoJsonShapeParserTests.java b/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/GeoJsonShapeParserTests.java index b53a850f9489..9b83cd9ffdb2 100644 --- a/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/GeoJsonShapeParserTests.java +++ b/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/GeoJsonShapeParserTests.java @@ -344,7 +344,7 @@ public class GeoJsonShapeParserTests extends BaseGeoParsingTestCase { assertGeometryEquals(p, polygonGeoJson, false); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.SEARCH_ANALYTICS) @AwaitsFix(bugUrl = "this test is using pre 8.0.0 index versions so needs to be removed or updated") public void testParse3DPolygon() throws IOException, ParseException { XContentBuilder polygonGeoJson = XContentFactory.jsonBuilder() diff --git a/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/GeoWKTShapeParserTests.java b/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/GeoWKTShapeParserTests.java index 58474d5521b7..5d0df9215ef2 100644 --- a/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/GeoWKTShapeParserTests.java +++ b/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/GeoWKTShapeParserTests.java @@ -303,7 +303,7 @@ public class GeoWKTShapeParserTests extends BaseGeoParsingTestCase { assertThat(e, hasToString(containsString("coordinate dimensions do not match"))); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.SEARCH_ANALYTICS) @AwaitsFix(bugUrl = "this test is using pre 8.0.0 index versions so needs to be removed or updated") public void testParseMixedDimensionPolyWithHoleStoredZ() throws IOException { List shellCoordinates = new ArrayList<>(); @@ -338,7 +338,7 @@ public class GeoWKTShapeParserTests extends BaseGeoParsingTestCase { assertThat(e, hasToString(containsString("unable to add coordinate to CoordinateBuilder: coordinate dimensions do not match"))); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.SEARCH_ANALYTICS) @AwaitsFix(bugUrl = "this test is using pre 8.0.0 index versions so needs to be removed or updated") public void testParsePolyWithStoredZ() throws IOException { List shellCoordinates = new ArrayList<>(); @@ -363,7 +363,7 @@ public class GeoWKTShapeParserTests extends BaseGeoParsingTestCase { assertEquals(shapeBuilder.numDimensions(), 3); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.SEARCH_ANALYTICS) @AwaitsFix(bugUrl = "this test is using pre 8.0.0 index versions so needs to be removed or updated") public void testParseOpenPolygon() throws IOException { String openPolygon = "POLYGON ((100 5, 100 10, 90 10, 90 5))"; diff --git a/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/mapper/LegacyGeoShapeFieldMapperTests.java b/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/mapper/LegacyGeoShapeFieldMapperTests.java index a0d5894ff622..7352b4d88a42 100644 --- a/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/mapper/LegacyGeoShapeFieldMapperTests.java +++ b/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/mapper/LegacyGeoShapeFieldMapperTests.java @@ -56,7 +56,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @SuppressWarnings("deprecation") -@UpdateForV9 +@UpdateForV9(owner = UpdateForV9.Owner.SEARCH_ANALYTICS) @AwaitsFix(bugUrl = "this is testing legacy functionality so can likely be removed in 9.0") public class LegacyGeoShapeFieldMapperTests extends MapperTestCase { diff --git a/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/mapper/LegacyGeoShapeFieldTypeTests.java b/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/mapper/LegacyGeoShapeFieldTypeTests.java index 78ba5db1f95c..bf616c819032 100644 --- a/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/mapper/LegacyGeoShapeFieldTypeTests.java +++ b/modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/mapper/LegacyGeoShapeFieldTypeTests.java @@ -23,7 +23,7 @@ import java.io.IOException; import java.util.List; import java.util.Map; -@UpdateForV9 +@UpdateForV9(owner = UpdateForV9.Owner.SEARCH_ANALYTICS) @LuceneTestCase.AwaitsFix(bugUrl = "this is testing legacy functionality so can likely be removed in 9.0") public class LegacyGeoShapeFieldTypeTests extends FieldTypeTestCase { diff --git a/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartIT.java b/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartIT.java index ee18f8fc2ec4..07d814c067be 100644 --- a/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartIT.java +++ b/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartIT.java @@ -1207,7 +1207,7 @@ public class FullClusterRestartIT extends ParameterizedFullClusterRestartTestCas closeIndex(index); } - @UpdateForV9 // This check can be removed (always assume true) + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_INDEXING) // This check can be removed (always assume true) var originalClusterSupportsReplicationOfClosedIndices = oldClusterHasFeature(RestTestLegacyFeatures.REPLICATION_OF_CLOSED_INDICES); if (originalClusterSupportsReplicationOfClosedIndices) { @@ -1608,7 +1608,7 @@ public class FullClusterRestartIT extends ParameterizedFullClusterRestartTestCas @SuppressWarnings("unchecked") public void testSystemIndexMetadataIsUpgraded() throws Exception { - @UpdateForV9 // assumeTrue can be removed (condition always true) + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // assumeTrue can be removed (condition always true) var originalClusterTaskIndexIsSystemIndex = oldClusterHasFeature(RestTestLegacyFeatures.TASK_INDEX_SYSTEM_INDEX); assumeTrue(".tasks became a system index in 7.10.0", originalClusterTaskIndexIsSystemIndex); final String systemIndexWarning = "this request accesses system indices: [.tasks], but in a future major version, direct " @@ -1729,7 +1729,7 @@ public class FullClusterRestartIT extends ParameterizedFullClusterRestartTestCas /** * This test ensures that soft deletes are enabled a when upgrading a pre-8 cluster to 8.0+ */ - @UpdateForV9 // This test can be removed in v9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) // This test can be removed in v9 public void testEnableSoftDeletesOnRestore() throws Exception { var originalClusterDidNotEnforceSoftDeletes = oldClusterHasFeature(RestTestLegacyFeatures.SOFT_DELETES_ENFORCED) == false; @@ -1842,7 +1842,7 @@ public class FullClusterRestartIT extends ParameterizedFullClusterRestartTestCas * with true/false as options. This test ensures that the old boolean setting in cluster state is * translated properly. This test can be removed in 9.0. */ - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) public void testTransportCompressionSetting() throws IOException { var originalClusterBooleanCompressSetting = oldClusterHasFeature(RestTestLegacyFeatures.NEW_TRANSPORT_COMPRESSED_SETTING) == false; assumeTrue("the old transport.compress setting existed before 7.14", originalClusterBooleanCompressSetting); diff --git a/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/QueryBuilderBWCIT.java b/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/QueryBuilderBWCIT.java index 42a0a3d6da05..9ca420efe115 100644 --- a/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/QueryBuilderBWCIT.java +++ b/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/QueryBuilderBWCIT.java @@ -250,7 +250,7 @@ public class QueryBuilderBWCIT extends ParameterizedFullClusterRestartTestCase { StreamInput input = new NamedWriteableAwareStreamInput(new InputStreamStreamInput(in), registry) ) { - @UpdateForV9 // condition will always be true + @UpdateForV9(owner = UpdateForV9.Owner.SEARCH_FOUNDATIONS) // condition will always be true var originalClusterHasTransportVersion = oldClusterHasFeature(RestTestLegacyFeatures.TRANSPORT_VERSION_SUPPORTED); final TransportVersion transportVersion; if (originalClusterHasTransportVersion == false) { diff --git a/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/NodesCapabilitiesUpgradeIT.java b/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/NodesCapabilitiesUpgradeIT.java index 6ddb59a65371..8c40dfa94d4a 100644 --- a/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/NodesCapabilitiesUpgradeIT.java +++ b/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/NodesCapabilitiesUpgradeIT.java @@ -20,7 +20,7 @@ import java.util.List; import static org.elasticsearch.test.hamcrest.OptionalMatchers.isPresentWith; -@UpdateForV9 +@UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public class NodesCapabilitiesUpgradeIT extends AbstractRollingUpgradeTestCase { private static Boolean upgradingBeforeCapabilities; diff --git a/rest-api-spec/src/yamlRestTest/java/org/elasticsearch/test/rest/ClientYamlTestSuiteIT.java b/rest-api-spec/src/yamlRestTest/java/org/elasticsearch/test/rest/ClientYamlTestSuiteIT.java index ae22f34d89c4..2b20e3501942 100644 --- a/rest-api-spec/src/yamlRestTest/java/org/elasticsearch/test/rest/ClientYamlTestSuiteIT.java +++ b/rest-api-spec/src/yamlRestTest/java/org/elasticsearch/test/rest/ClientYamlTestSuiteIT.java @@ -42,7 +42,7 @@ public class ClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase { super(testCandidate); } - @UpdateForV9 // remove restCompat check + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // remove restCompat check @ParametersFactory public static Iterable parameters() throws Exception { String restCompatProperty = System.getProperty("tests.restCompat"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/gateway/ReplicaShardAllocatorSyncIdIT.java b/server/src/internalClusterTest/java/org/elasticsearch/gateway/ReplicaShardAllocatorSyncIdIT.java index c3ffd60e630e..623933436a47 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/gateway/ReplicaShardAllocatorSyncIdIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/gateway/ReplicaShardAllocatorSyncIdIT.java @@ -62,7 +62,7 @@ import static org.hamcrest.Matchers.hasSize; * that the {@link ReplicaShardAllocator} prefers copies with matching sync_id. */ @ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -@UpdateForV9 // remove this test in v9 +@UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) // remove this test in v9 public class ReplicaShardAllocatorSyncIdIT extends ESIntegTestCase { private static final AtomicBoolean allowFlush = new AtomicBoolean(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/MalformedDynamicTemplateIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/MalformedDynamicTemplateIT.java index 9dd055dde66b..9fd657b809f2 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/MalformedDynamicTemplateIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/MalformedDynamicTemplateIT.java @@ -35,7 +35,7 @@ public class MalformedDynamicTemplateIT extends ESIntegTestCase { * contains unknown parameters. We were able to create those templates in 7.x still, so we need * to be able to index new documents into them. Indexing should issue a deprecation warning though. */ - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) @AwaitsFix(bugUrl = "this is testing 7.x specific compatibility which may be n/a now after 9.0 bump") public void testBWCMalformedDynamicTemplate() { // this parameter is not supported by "keyword" field type diff --git a/server/src/internalClusterTest/java/org/elasticsearch/repositories/IndexSnapshotsServiceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/repositories/IndexSnapshotsServiceIT.java index 3b59f40fbed1..4460bd2e0c30 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/repositories/IndexSnapshotsServiceIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/repositories/IndexSnapshotsServiceIT.java @@ -109,7 +109,7 @@ public class IndexSnapshotsServiceIT extends AbstractSnapshotIntegTestCase { expectThrows(IllegalArgumentException.class, () -> getLatestSnapshotForShardFuture(Collections.emptyList(), "idx", 0, false)); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) // below we were selecting an index version between current and 7.5.0, this has been updated to 8.0.0 now but that might need to change public void testGetShardSnapshotReturnsTheLatestSuccessfulSnapshot() throws Exception { final String repoName = "repo-name"; diff --git a/server/src/main/java/org/elasticsearch/ReleaseVersions.java b/server/src/main/java/org/elasticsearch/ReleaseVersions.java index 181021a7d344..09d6bdd1b479 100644 --- a/server/src/main/java/org/elasticsearch/ReleaseVersions.java +++ b/server/src/main/java/org/elasticsearch/ReleaseVersions.java @@ -114,8 +114,8 @@ public class ReleaseVersions { // this will no longer be the case with ES 10 (which won't know about ES v8.x where we introduced separated versions) // maybe keep the release mapping around in the csv file? // SEP for now - @UpdateForV9 - // @UpdateForV10 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) + // @UpdateForV10(owner = UpdateForV10.Owner.CORE_INFRA) Version oldVersion = Version.fromId(id); return oldVersion.toString(); } diff --git a/server/src/main/java/org/elasticsearch/TransportVersions.java b/server/src/main/java/org/elasticsearch/TransportVersions.java index 998bc175dc6b..0ced472ea310 100644 --- a/server/src/main/java/org/elasticsearch/TransportVersions.java +++ b/server/src/main/java/org/elasticsearch/TransportVersions.java @@ -50,7 +50,7 @@ public class TransportVersions { return new TransportVersion(id); } - @UpdateForV9 // remove the transport versions with which v9 will not need to interact + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // remove the transport versions with which v9 will not need to interact public static final TransportVersion ZERO = def(0); public static final TransportVersion V_7_0_0 = def(7_00_00_99); public static final TransportVersion V_7_0_1 = def(7_00_01_99); @@ -289,7 +289,7 @@ public class TransportVersions { * Reference to the earliest compatible transport version to this version of the codebase. * This should be the transport version used by the highest minor version of the previous major. */ - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // This needs to be bumped to the 8.last public static final TransportVersion MINIMUM_COMPATIBLE = V_7_17_0; diff --git a/server/src/main/java/org/elasticsearch/Version.java b/server/src/main/java/org/elasticsearch/Version.java index fea27255e132..4b19d4b42852 100644 --- a/server/src/main/java/org/elasticsearch/Version.java +++ b/server/src/main/java/org/elasticsearch/Version.java @@ -232,7 +232,7 @@ public class Version implements VersionId, ToXContentFragment { VERSION_STRINGS = Map.copyOf(builderByString); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // Re-enable this assertion once the rest api version is bumped private static void assertRestApiVersion() { // assert RestApiVersion.current().major == CURRENT.major && RestApiVersion.previous().major == CURRENT.major - 1 diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/migration/TransportGetFeatureUpgradeStatusAction.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/migration/TransportGetFeatureUpgradeStatusAction.java index be151143a817..e2475bca31d5 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/migration/TransportGetFeatureUpgradeStatusAction.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/migration/TransportGetFeatureUpgradeStatusAction.java @@ -56,7 +56,7 @@ public class TransportGetFeatureUpgradeStatusAction extends TransportMasterNodeA /** * Once all feature migrations for 8.x -> 9.x have been tested, we can bump this to Version.V_8_0_0 */ - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final Version NO_UPGRADE_REQUIRED_VERSION = Version.V_7_0_0; public static final IndexVersion NO_UPGRADE_REQUIRED_INDEX_VERSION = IndexVersions.V_7_0_0; @@ -64,7 +64,7 @@ public class TransportGetFeatureUpgradeStatusAction extends TransportMasterNodeA PersistentTasksService persistentTasksService; @Inject - @UpdateForV9 // Once we begin working on 9.x, we need to update our migration classes + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // Once we begin working on 9.x, we need to update our migration classes public TransportGetFeatureUpgradeStatusAction( TransportService transportService, ThreadPool threadPool, diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/capabilities/TransportNodesCapabilitiesAction.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/capabilities/TransportNodesCapabilitiesAction.java index fb7539ea218d..9fede2ebb5be 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/capabilities/TransportNodesCapabilitiesAction.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/capabilities/TransportNodesCapabilitiesAction.java @@ -152,7 +152,7 @@ public class TransportNodesCapabilitiesAction extends TransportNodesAction< this.restApiVersion = restApiVersion; } - @UpdateForV9 // 8.x blows up in a mixed cluster when trying to read RestApiVersion.forMajor(9) + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // 8.x blows up in a mixed cluster when trying to read RestApiVersion.forMajor(9) // ./gradlew ":qa:mixed-cluster:v8.16.0#mixedClusterTest" // -Dtests.class="org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT" // -Dtests.method="test {p0=capabilities/10_basic/Capabilities API}" diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/features/TransportNodesFeaturesAction.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/features/TransportNodesFeaturesAction.java index e5e04c8490c8..83d1356e5ef6 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/features/TransportNodesFeaturesAction.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/features/TransportNodesFeaturesAction.java @@ -27,7 +27,7 @@ import org.elasticsearch.transport.TransportService; import java.io.IOException; import java.util.List; -@UpdateForV9 +@UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // @UpdateForV10 // this can be removed in v10. It may be called by v8 nodes to v9 nodes. public class TransportNodesFeaturesAction extends TransportNodesAction< NodesFeaturesRequest, diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsResponse.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsResponse.java index 1111d8d99f28..dc261177567c 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsResponse.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsResponse.java @@ -35,7 +35,7 @@ public class GetSnapshotsResponse extends ActionResponse implements ChunkedToXCo private final List snapshots; - @UpdateForV9 // always empty, can be dropped + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) // always empty, can be dropped private final Map failures; @Nullable diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java index ab68f1d8481f..ac875cb7adc5 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java @@ -306,7 +306,7 @@ public class TransportClusterStatsAction extends TransportNodesAction< ); } - @UpdateForV9 // this can be replaced with TransportRequest.Empty in v9 + @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) // this can be replaced with TransportRequest.Empty in v9 public static class ClusterStatsNodeRequest extends TransportRequest { ClusterStatsNodeRequest() {} diff --git a/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestParser.java b/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestParser.java index c27e3d319d7c..cd74989e5df7 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestParser.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestParser.java @@ -454,7 +454,7 @@ public final class BulkRequestParser { return isIncremental ? consumed : from; } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_INDEXING) // Warnings will need to be replaced with XContentEOFException from 9.x private static void warnBulkActionNotProperlyClosed(String message) { deprecationLogger.compatibleCritical(STRICT_ACTION_PARSING_WARNING_KEY, message); diff --git a/server/src/main/java/org/elasticsearch/cluster/ClusterModule.java b/server/src/main/java/org/elasticsearch/cluster/ClusterModule.java index b7c7caecd65a..0383bbb9bd40 100644 --- a/server/src/main/java/org/elasticsearch/cluster/ClusterModule.java +++ b/server/src/main/java/org/elasticsearch/cluster/ClusterModule.java @@ -391,7 +391,7 @@ public class ClusterModule extends AbstractModule { } } - @UpdateForV10 // in v10 there is only one allocator + @UpdateForV10(owner = UpdateForV10.Owner.DISTRIBUTED_COORDINATION) // in v10 there is only one allocator private static ShardsAllocator createShardsAllocator( Settings settings, ClusterSettings clusterSettings, diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/JoinValidationService.java b/server/src/main/java/org/elasticsearch/cluster/coordination/JoinValidationService.java index 3918f1c2f163..34d59c9860ab 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/JoinValidationService.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/JoinValidationService.java @@ -177,7 +177,7 @@ public class JoinValidationService { } } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) private void legacyValidateJoin(DiscoveryNode discoveryNode, ActionListener listener, Transport.Connection connection) { final var responseHandler = TransportResponseHandler.empty(responseExecutor, listener.delegateResponse((l, e) -> { logger.warn(() -> "failed to validate incoming join request from node [" + discoveryNode + "]", e); diff --git a/server/src/main/java/org/elasticsearch/cluster/features/NodeFeaturesFixupListener.java b/server/src/main/java/org/elasticsearch/cluster/features/NodeFeaturesFixupListener.java index 759821019152..4d9074be1569 100644 --- a/server/src/main/java/org/elasticsearch/cluster/features/NodeFeaturesFixupListener.java +++ b/server/src/main/java/org/elasticsearch/cluster/features/NodeFeaturesFixupListener.java @@ -43,7 +43,7 @@ import java.util.Set; import java.util.concurrent.Executor; import java.util.stream.Collectors; -@UpdateForV9 // this can be removed in v9 +@UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // this can be removed in v9 public class NodeFeaturesFixupListener implements ClusterStateListener { private static final Logger logger = LogManager.getLogger(NodeFeaturesFixupListener.class); diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/DesiredNode.java b/server/src/main/java/org/elasticsearch/cluster/metadata/DesiredNode.java index eab17fa93536..fb8559b19d81 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/DesiredNode.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/DesiredNode.java @@ -58,7 +58,7 @@ public final class DesiredNode implements Writeable, ToXContentObject, Comparabl private static final ParseField PROCESSORS_RANGE_FIELD = new ParseField("processors_range"); private static final ParseField MEMORY_FIELD = new ParseField("memory"); private static final ParseField STORAGE_FIELD = new ParseField("storage"); - @UpdateForV9 // Remove deprecated field + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) // Remove deprecated field private static final ParseField VERSION_FIELD = new ParseField("node_version"); public static final ConstructingObjectParser PARSER = new ConstructingObjectParser<>( @@ -118,7 +118,7 @@ public final class DesiredNode implements Writeable, ToXContentObject, Comparabl private final ByteSizeValue memory; private final ByteSizeValue storage; - @UpdateForV9 // Remove deprecated version field + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) // Remove deprecated version field private final String version; private final String externalId; private final Set roles; @@ -278,7 +278,7 @@ public final class DesiredNode implements Writeable, ToXContentObject, Comparabl addDeprecatedVersionField(builder); } - @UpdateForV9 // Remove deprecated field from response + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) // Remove deprecated field from response private void addDeprecatedVersionField(XContentBuilder builder) throws IOException { if (version != null) { builder.field(VERSION_FIELD.getPreferredName(), version); diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/DiskThresholdSettings.java b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/DiskThresholdSettings.java index 54f20ba8c20a..d1d6a9761a75 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/DiskThresholdSettings.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/DiskThresholdSettings.java @@ -160,7 +160,7 @@ public class DiskThresholdSettings implements Writeable { checkAutoReleaseIndexEnabled(); } - @UpdateForV9 // this check is unnecessary in v9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) // this check is unnecessary in v9 private static void checkAutoReleaseIndexEnabled() { final String AUTO_RELEASE_INDEX_ENABLED_KEY = "es.disk.auto_release_flood_stage_block"; final String property = System.getProperty(AUTO_RELEASE_INDEX_ENABLED_KEY); diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java index 27087992f9d2..840aa3a3c1d3 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java @@ -149,7 +149,7 @@ public class BalancedShardsAllocator implements ShardsAllocator { * * Once {@link org.elasticsearch.Version#V_7_17_0} goes out of scope, start to properly reject such bad values. */ - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) private static float ensureValidThreshold(float threshold) { if (1.0f <= threshold) { return threshold; diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDecider.java b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDecider.java index b08f38c37c97..ea6f93cbc881 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDecider.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDecider.java @@ -72,7 +72,7 @@ public class DiskThresholdDecider extends AllocationDecider { public static final String NAME = "disk_threshold"; - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) public static final Setting ENABLE_FOR_SINGLE_DATA_NODE = Setting.boolSetting( "cluster.routing.allocation.disk.watermark.enable_for_single_data_node", true, diff --git a/server/src/main/java/org/elasticsearch/cluster/service/TransportVersionsFixupListener.java b/server/src/main/java/org/elasticsearch/cluster/service/TransportVersionsFixupListener.java index 93f0d8b80190..0ae0f8b10aed 100644 --- a/server/src/main/java/org/elasticsearch/cluster/service/TransportVersionsFixupListener.java +++ b/server/src/main/java/org/elasticsearch/cluster/service/TransportVersionsFixupListener.java @@ -50,7 +50,7 @@ import static org.elasticsearch.cluster.ClusterState.INFERRED_TRANSPORT_VERSION; * due to the master node not understanding cluster state with transport versions added in 8.8.0. * Any nodes with the inferred placeholder cluster state is then refreshed with their actual transport version */ -@UpdateForV9 // this can be removed in v9 +@UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // this can be removed in v9 public class TransportVersionsFixupListener implements ClusterStateListener { private static final Logger logger = LogManager.getLogger(TransportVersionsFixupListener.class); 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 9a235bc4e162..feda67cb466b 100644 --- a/server/src/main/java/org/elasticsearch/common/settings/Setting.java +++ b/server/src/main/java/org/elasticsearch/common/settings/Setting.java @@ -150,7 +150,7 @@ public class Setting implements ToXContentObject { * Indicates that this index-level setting was deprecated in {@link Version#V_7_17_0} and is * forbidden in indices created from {@link Version#V_8_0_0} onwards. */ - @UpdateForV9 // introduce IndexSettingDeprecatedInV8AndRemovedInV9 to replace this constant + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // introduce IndexSettingDeprecatedInV8AndRemovedInV9 to replace this constant IndexSettingDeprecatedInV7AndRemovedInV8, /** @@ -639,7 +639,7 @@ public class Setting implements ToXContentObject { 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 // https://github.com/elastic/elasticsearch/issues/79666 + @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); diff --git a/server/src/main/java/org/elasticsearch/common/time/DateFormatters.java b/server/src/main/java/org/elasticsearch/common/time/DateFormatters.java index 1d84623ba06e..ce27cae16256 100644 --- a/server/src/main/java/org/elasticsearch/common/time/DateFormatters.java +++ b/server/src/main/java/org/elasticsearch/common/time/DateFormatters.java @@ -59,7 +59,7 @@ public class DateFormatters { * Note that this property is sometimes set by {@code ESTestCase.setTestSysProps} to flip between implementations in tests, * to ensure both are fully tested */ - @UpdateForV9 // evaluate if we need to deprecate/remove this + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // evaluate if we need to deprecate/remove this private static final boolean JAVA_TIME_PARSERS_ONLY = Booleans.parseBoolean(System.getProperty("es.datetime.java_time_parsers"), false); static { diff --git a/server/src/main/java/org/elasticsearch/env/NodeMetadata.java b/server/src/main/java/org/elasticsearch/env/NodeMetadata.java index 9901afc6b6f6..6a72a7e7fcda 100644 --- a/server/src/main/java/org/elasticsearch/env/NodeMetadata.java +++ b/server/src/main/java/org/elasticsearch/env/NodeMetadata.java @@ -42,7 +42,7 @@ public final class NodeMetadata { private final IndexVersion oldestIndexVersion; - @UpdateForV9 // version should be non-null in the node metadata from v9 onwards + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // version should be non-null in the node metadata from v9 onwards private NodeMetadata( final String nodeId, final BuildVersion buildVersion, @@ -112,7 +112,7 @@ public final class NodeMetadata { return oldestIndexVersion; } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public void verifyUpgradeToCurrentVersion() { // Enable the following assertion for V9: // assert (nodeVersion.equals(BuildVersion.empty()) == false) : "version is required in the node metadata from v9 onwards"; @@ -163,7 +163,7 @@ public final class NodeMetadata { this.oldestIndexVersion = IndexVersion.fromId(oldestIndexVersion); } - @UpdateForV9 // version is required in the node metadata from v9 onwards + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // version is required in the node metadata from v9 onwards public NodeMetadata build() { final IndexVersion oldestIndexVersion; diff --git a/server/src/main/java/org/elasticsearch/gateway/GatewayMetaState.java b/server/src/main/java/org/elasticsearch/gateway/GatewayMetaState.java index a3d5d7501667..c863a5bac973 100644 --- a/server/src/main/java/org/elasticsearch/gateway/GatewayMetaState.java +++ b/server/src/main/java/org/elasticsearch/gateway/GatewayMetaState.java @@ -186,7 +186,7 @@ public class GatewayMetaState implements Closeable { long currentTerm = onDiskState.currentTerm; if (onDiskState.empty()) { - @UpdateForV9 // legacy metadata loader is not needed anymore from v9 onwards + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) // legacy metadata loader is not needed anymore from v9 onwards final Tuple legacyState = metaStateService.loadFullState(); if (legacyState.v1().isEmpty() == false) { metadata = legacyState.v2(); diff --git a/server/src/main/java/org/elasticsearch/gateway/MetaStateService.java b/server/src/main/java/org/elasticsearch/gateway/MetaStateService.java index 73764f96443d..4260ef51a397 100644 --- a/server/src/main/java/org/elasticsearch/gateway/MetaStateService.java +++ b/server/src/main/java/org/elasticsearch/gateway/MetaStateService.java @@ -56,7 +56,7 @@ public class MetaStateService { * meta state with globalGeneration -1 and empty meta data is returned. * @throws IOException if some IOException when loading files occurs or there is no metadata referenced by manifest file. */ - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) public Tuple loadFullState() throws IOException { final Manifest manifest = Manifest.FORMAT.loadLatestState(logger, namedXContentRegistry, nodeEnv.nodeDataPaths()); if (manifest == null) { diff --git a/server/src/main/java/org/elasticsearch/index/IndexVersions.java b/server/src/main/java/org/elasticsearch/index/IndexVersions.java index 9dde1a8d28e5..e9b1adabfd00 100644 --- a/server/src/main/java/org/elasticsearch/index/IndexVersions.java +++ b/server/src/main/java/org/elasticsearch/index/IndexVersions.java @@ -48,7 +48,7 @@ public class IndexVersions { return new IndexVersion(id, luceneVersion); } - @UpdateForV9 // remove the index versions with which v9 will not need to interact + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // remove the index versions with which v9 will not need to interact public static final IndexVersion ZERO = def(0, Version.LATEST); public static final IndexVersion V_7_0_0 = def(7_00_00_99, Version.LUCENE_8_0_0); @@ -222,7 +222,7 @@ public class IndexVersions { return Collections.unmodifiableNavigableMap(builder); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // We can simplify this once we've removed all references to index versions earlier than MINIMUM_COMPATIBLE static Collection getAllVersions() { return VERSION_IDS.values().stream().filter(v -> v.onOrAfter(MINIMUM_COMPATIBLE)).toList(); diff --git a/server/src/main/java/org/elasticsearch/index/engine/Engine.java b/server/src/main/java/org/elasticsearch/index/engine/Engine.java index 8311642ab707..7d23a64b14b8 100644 --- a/server/src/main/java/org/elasticsearch/index/engine/Engine.java +++ b/server/src/main/java/org/elasticsearch/index/engine/Engine.java @@ -117,7 +117,7 @@ import static org.elasticsearch.index.seqno.SequenceNumbers.UNASSIGNED_SEQ_NO; public abstract class Engine implements Closeable { - @UpdateForV9 // TODO: Remove sync_id in 9.0 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_INDEXING) // TODO: Remove sync_id in 9.0 public static final String SYNC_COMMIT_ID = "sync_id"; public static final String HISTORY_UUID_KEY = "history_uuid"; public static final String FORCE_MERGE_UUID_KEY = "force_merge_uuid"; diff --git a/server/src/main/java/org/elasticsearch/index/seqno/ReplicationTracker.java b/server/src/main/java/org/elasticsearch/index/seqno/ReplicationTracker.java index 003eb4010415..e67e878fd382 100644 --- a/server/src/main/java/org/elasticsearch/index/seqno/ReplicationTracker.java +++ b/server/src/main/java/org/elasticsearch/index/seqno/ReplicationTracker.java @@ -471,7 +471,7 @@ public class ReplicationTracker extends AbstractIndexShardComponent implements L return emptyIfNull(retentionLeases); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_INDEXING) private static RetentionLeases emptyIfNull(RetentionLeases retentionLeases) { // we expect never to see a null in 8.x, so adjust this to throw an exception from v9 onwards. return retentionLeases == null ? RetentionLeases.EMPTY : retentionLeases; diff --git a/server/src/main/java/org/elasticsearch/node/NodeConstruction.java b/server/src/main/java/org/elasticsearch/node/NodeConstruction.java index 9a7dfba09572..16b180a82acc 100644 --- a/server/src/main/java/org/elasticsearch/node/NodeConstruction.java +++ b/server/src/main/java/org/elasticsearch/node/NodeConstruction.java @@ -541,7 +541,7 @@ class NodeConstruction { return settingsModule; } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.SEARCH_FOUNDATIONS) private static void addBwcSearchWorkerSettings(List> additionalSettings) { // TODO remove the below settings, they are unused and only here to enable BwC for deployments that still use them additionalSettings.add( diff --git a/server/src/main/java/org/elasticsearch/rest/RestCompatibleVersionHelper.java b/server/src/main/java/org/elasticsearch/rest/RestCompatibleVersionHelper.java index 6837e6add3e1..07cc73f4da2b 100644 --- a/server/src/main/java/org/elasticsearch/rest/RestCompatibleVersionHelper.java +++ b/server/src/main/java/org/elasticsearch/rest/RestCompatibleVersionHelper.java @@ -27,7 +27,7 @@ class RestCompatibleVersionHelper { /** * @return The requested API version, or {@link Optional#empty()} if there was no explicit version in the request. */ - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) static Optional getCompatibleVersion( @Nullable ParsedMediaType acceptHeader, @Nullable ParsedMediaType contentTypeHeader, diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCloseIndexAction.java b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCloseIndexAction.java index 0e02a35dd7fa..a2cf3c08196a 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCloseIndexAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestCloseIndexAction.java @@ -47,7 +47,7 @@ public class RestCloseIndexAction extends BaseRestHandler { } @Override - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException { CloseIndexRequest closeIndexRequest = new CloseIndexRequest(Strings.splitStringByCommaToArray(request.param("index"))); closeIndexRequest.masterNodeTimeout(getMasterNodeTimeout(request)); diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetAliasesAction.java b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetAliasesAction.java index 37e8cb13a207..79e5c574d93b 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetAliasesAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetAliasesAction.java @@ -52,7 +52,7 @@ import static org.elasticsearch.rest.RestRequest.Method.HEAD; @ServerlessScope(Scope.PUBLIC) public class RestGetAliasesAction extends BaseRestHandler { - @UpdateForV9 // reject the deprecated ?local parameter + @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) // reject the deprecated ?local parameter private static final DeprecationLogger DEPRECATION_LOGGER = DeprecationLogger.getLogger(RestGetAliasesAction.class); @Override diff --git a/server/src/main/java/org/elasticsearch/rest/action/search/RestKnnSearchAction.java b/server/src/main/java/org/elasticsearch/rest/action/search/RestKnnSearchAction.java index 9b9be199eeda..e552f4058a87 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/search/RestKnnSearchAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/search/RestKnnSearchAction.java @@ -34,7 +34,8 @@ public class RestKnnSearchAction extends BaseRestHandler { public RestKnnSearchAction() {} - @UpdateForV9 // these routes were ".deprecated" in RestApiVersion.V_8 which will require use of REST API compatibility headers to access + @UpdateForV9(owner = UpdateForV9.Owner.SEARCH_RELEVANCE) + // these routes were ".deprecated" in RestApiVersion.V_8 which will require use of REST API compatibility headers to access // this API in v9. It is unclear if this was intentional for v9, and the code has been updated to ".deprecateAndKeep" which will // continue to emit deprecations warnings but will not require any special headers to access the API in v9. // Please review and update the code and tests as needed. The original code remains commented out below for reference. diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/pipeline/MovAvgPipelineAggregationBuilder.java b/server/src/main/java/org/elasticsearch/search/aggregations/pipeline/MovAvgPipelineAggregationBuilder.java index 8326342df09f..068487317dfe 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/pipeline/MovAvgPipelineAggregationBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/pipeline/MovAvgPipelineAggregationBuilder.java @@ -33,7 +33,7 @@ import java.util.Map; * * @deprecated Only for 7.x rest compat */ -@UpdateForV9 // remove this since it's only for 7.x compat and 7.x compat will be removed in 9.0 +@UpdateForV9(owner = UpdateForV9.Owner.SEARCH_ANALYTICS) // remove this since it's only for 7.x compat and 7.x compat will be removed in 9.0 @Deprecated public class MovAvgPipelineAggregationBuilder extends AbstractPipelineAggregationBuilder { private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(CommonTermsQueryBuilder.class); diff --git a/server/src/main/java/org/elasticsearch/threadpool/ThreadPool.java b/server/src/main/java/org/elasticsearch/threadpool/ThreadPool.java index 9eb994896cbf..0155ab34ae63 100644 --- a/server/src/main/java/org/elasticsearch/threadpool/ThreadPool.java +++ b/server/src/main/java/org/elasticsearch/threadpool/ThreadPool.java @@ -120,11 +120,11 @@ public class ThreadPool implements ReportingService, Scheduler { public enum ThreadPoolType { @Deprecated(forRemoval = true) - @UpdateForV9 // no longer used, remove in v9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // no longer used, remove in v9 DIRECT("direct"), FIXED("fixed"), @Deprecated(forRemoval = true) - @UpdateForV9 // no longer used, remove in v9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // no longer used, remove in v9 FIXED_AUTO_QUEUE_SIZE("fixed_auto_queue_size"), SCALING("scaling"); diff --git a/server/src/main/java/org/elasticsearch/transport/TransportStats.java b/server/src/main/java/org/elasticsearch/transport/TransportStats.java index 9f133b25b2be..46b161b01e9f 100644 --- a/server/src/main/java/org/elasticsearch/transport/TransportStats.java +++ b/server/src/main/java/org/elasticsearch/transport/TransportStats.java @@ -166,7 +166,8 @@ public class TransportStats implements Writeable, ChunkedToXContent { return transportActionStats; } - @UpdateForV9 // Review and simplify the if-else blocks containing this symbol once v9 is released + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) + // Review and simplify the if-else blocks containing this symbol once v9 is released private static final boolean IMPOSSIBLE_IN_V9 = true; private boolean assertHistogramsConsistent() { @@ -181,7 +182,8 @@ public class TransportStats implements Writeable, ChunkedToXContent { } @Override - @UpdateForV9 // review the "if" blocks checking for non-empty once we have + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) + // review the "if" blocks checking for non-empty once we have public Iterator toXContentChunked(ToXContent.Params outerParams) { return Iterators.concat(Iterators.single((builder, params) -> { builder.startObject(Fields.TRANSPORT); diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/migration/TransportGetFeatureUpgradeStatusActionTests.java b/server/src/test/java/org/elasticsearch/action/admin/cluster/migration/TransportGetFeatureUpgradeStatusActionTests.java index e1441cc4af91..8a51963097da 100644 --- a/server/src/test/java/org/elasticsearch/action/admin/cluster/migration/TransportGetFeatureUpgradeStatusActionTests.java +++ b/server/src/test/java/org/elasticsearch/action/admin/cluster/migration/TransportGetFeatureUpgradeStatusActionTests.java @@ -85,7 +85,8 @@ public class TransportGetFeatureUpgradeStatusActionTests extends ESTestCase { .numberOfReplicas(0) .build(); - @UpdateForV9 // Once we start testing 9.x, we should update this test to use a 7.x "version created" + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) + // Once we start testing 9.x, we should update this test to use a 7.x "version created" IndexMetadata indexMetadata2 = IndexMetadata.builder(".test-index-2") .settings(Settings.builder().put("index.version.created", TEST_OLD_VERSION).build()) .numberOfShards(1) diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexServiceTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexServiceTests.java index 91b0c6502993..b8804e9160a7 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexServiceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexServiceTests.java @@ -1315,7 +1315,7 @@ public class MetadataCreateIndexServiceTests extends ESTestCase { ); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) @AwaitsFix(bugUrl = "looks like a test that's not applicable to 9.0 after version bump") public void testDeprecateTranslogRetentionSettings() { request = new CreateIndexClusterStateUpdateRequest("create index", "test", "test"); diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataTests.java index 284bb870652c..4818291710a0 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataTests.java @@ -1977,7 +1977,7 @@ public class MetadataTests extends ESTestCase { } } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) @AwaitsFix(bugUrl = "this test needs to be updated or removed after the version 9.0 bump") public void testSystemAliasValidationMixedVersionSystemAndRegularFails() { final IndexVersion random7xVersion = IndexVersionUtils.randomVersionBetween( @@ -2029,7 +2029,7 @@ public class MetadataTests extends ESTestCase { ); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) @AwaitsFix(bugUrl = "this test needs to be updated or removed after the version 9.0 bump") public void testSystemAliasOldSystemAndNewRegular() { final IndexVersion random7xVersion = IndexVersionUtils.randomVersionBetween( @@ -2044,7 +2044,7 @@ public class MetadataTests extends ESTestCase { metadataWithIndices(oldVersionSystem, regularIndex); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) @AwaitsFix(bugUrl = "this test needs to be updated or removed after the version 9.0 bump") public void testSystemIndexValidationAllRegular() { final IndexVersion random7xVersion = IndexVersionUtils.randomVersionBetween( @@ -2060,7 +2060,7 @@ public class MetadataTests extends ESTestCase { metadataWithIndices(currentVersionSystem, currentVersionSystem2, oldVersionSystem); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) @AwaitsFix(bugUrl = "this test needs to be updated or removed after the version 9.0 bump") public void testSystemAliasValidationAllSystemSomeOld() { final IndexVersion random7xVersion = IndexVersionUtils.randomVersionBetween( diff --git a/server/src/test/java/org/elasticsearch/common/xcontent/CompatibleNamedXContentRegistryTests.java b/server/src/test/java/org/elasticsearch/common/xcontent/CompatibleNamedXContentRegistryTests.java index 61a1f28f22b1..de1990361e76 100644 --- a/server/src/test/java/org/elasticsearch/common/xcontent/CompatibleNamedXContentRegistryTests.java +++ b/server/src/test/java/org/elasticsearch/common/xcontent/CompatibleNamedXContentRegistryTests.java @@ -116,7 +116,7 @@ public class CompatibleNamedXContentRegistryTests extends ESTestCase { } } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) @AwaitsFix(bugUrl = "this can be re-enabled once our rest api version is bumped to V_9") public void testNotCompatibleRequest() throws IOException { NamedXContentRegistry registry = new NamedXContentRegistry( diff --git a/server/src/test/java/org/elasticsearch/env/NodeEnvironmentTests.java b/server/src/test/java/org/elasticsearch/env/NodeEnvironmentTests.java index 61f2703395d2..42a94ebf8c6f 100644 --- a/server/src/test/java/org/elasticsearch/env/NodeEnvironmentTests.java +++ b/server/src/test/java/org/elasticsearch/env/NodeEnvironmentTests.java @@ -539,7 +539,7 @@ public class NodeEnvironmentTests extends ESTestCase { } } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) @AwaitsFix(bugUrl = "test won't work until we remove and bump minimum index versions") public void testIndexCompatibilityChecks() throws IOException { final Settings settings = buildEnvSettings(Settings.EMPTY); @@ -638,7 +638,7 @@ public class NodeEnvironmentTests extends ESTestCase { env.close(); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) @AwaitsFix(bugUrl = "test won't work until we remove and bump minimum index versions") public void testGetBestDowngradeVersion() { assertThat(NodeEnvironment.getBestDowngradeVersion("7.17.0"), Matchers.equalTo("7.17.0")); diff --git a/server/src/test/java/org/elasticsearch/env/NodeMetadataTests.java b/server/src/test/java/org/elasticsearch/env/NodeMetadataTests.java index e74b9d25c36b..8bfd4c7c5ac6 100644 --- a/server/src/test/java/org/elasticsearch/env/NodeMetadataTests.java +++ b/server/src/test/java/org/elasticsearch/env/NodeMetadataTests.java @@ -80,7 +80,7 @@ public class NodeMetadataTests extends ESTestCase { ); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) @AwaitsFix(bugUrl = "as mentioned in the comment below, the behavior here is changing for 9.0 so this test needs updating") public void testReadsFormatWithoutVersion() throws IOException { // the behaviour tested here is only appropriate if the current version is compatible with versions 7 and earlier @@ -155,7 +155,7 @@ public class NodeMetadataTests extends ESTestCase { ); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) @AwaitsFix(bugUrl = "Needs to be updated for 9.0 version bump") public void testUpgradeMarksPreviousVersion() { final String nodeId = randomAlphaOfLength(10); diff --git a/server/src/test/java/org/elasticsearch/index/IndexVersionTests.java b/server/src/test/java/org/elasticsearch/index/IndexVersionTests.java index a659e5e5263a..2a425c9256c3 100644 --- a/server/src/test/java/org/elasticsearch/index/IndexVersionTests.java +++ b/server/src/test/java/org/elasticsearch/index/IndexVersionTests.java @@ -151,7 +151,7 @@ public class IndexVersionTests extends ESTestCase { } } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) @AwaitsFix(bugUrl = "believe this fails because index version has not yet been bumped to 9.0") public void testMinimumCompatibleVersion() { assertThat(IndexVersion.getMinimumCompatibleIndexVersion(7170099), equalTo(IndexVersion.fromId(6000099))); @@ -193,7 +193,7 @@ public class IndexVersionTests extends ESTestCase { } } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) @AwaitsFix(bugUrl = "can be unmuted once lucene is bumped to version 10") public void testLuceneVersionOnUnknownVersions() { // between two known versions, should use the lucene version of the previous version diff --git a/server/src/test/java/org/elasticsearch/index/mapper/ParametrizedMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/ParametrizedMapperTests.java index ee805d3e3758..2681f70743f5 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/ParametrizedMapperTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/ParametrizedMapperTests.java @@ -578,7 +578,7 @@ public class ParametrizedMapperTests extends MapperServiceTestCase { ); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.SEARCH_FOUNDATIONS) @AwaitsFix(bugUrl = "this is testing legacy functionality so can likely be removed in 9.0") public void testDeprecatedParameters() { // 'index' is declared explicitly, 'store' is not, but is one of the previously always-accepted params diff --git a/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java b/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java index 66ab09f3a611..ab65d56557ad 100644 --- a/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java +++ b/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java @@ -98,7 +98,7 @@ public class IndicesModuleTests extends ESTestCase { DataStreamTimestampFieldMapper.NAME, FieldNamesFieldMapper.NAME }; - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.SEARCH_FOUNDATIONS) @AwaitsFix(bugUrl = "test is referencing 7.x index versions so needs to be updated for 9.0 bump") public void testBuiltinMappers() { IndicesModule module = new IndicesModule(Collections.emptyList()); diff --git a/test/framework/src/main/java/org/elasticsearch/snapshots/AbstractSnapshotIntegTestCase.java b/test/framework/src/main/java/org/elasticsearch/snapshots/AbstractSnapshotIntegTestCase.java index c28358d7a62b..8bc81fef2157 100644 --- a/test/framework/src/main/java/org/elasticsearch/snapshots/AbstractSnapshotIntegTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/snapshots/AbstractSnapshotIntegTestCase.java @@ -366,7 +366,7 @@ public abstract class AbstractSnapshotIntegTestCase extends ESIntegTestCase { /** * Randomly write an empty snapshot of an older version to an empty repository to simulate an older repository metadata format. */ - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) // This used to pick an index version from 7.0.0 to 8.9.0. The minimum now is 8.0.0 but it's not clear what the upper range should be protected void maybeInitWithOldSnapshotVersion(String repoName, Path repoPath) throws Exception { if (randomBoolean() && randomBoolean()) { diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java index b15e4bed573a..e8c1aecb7abe 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java @@ -1935,7 +1935,7 @@ public abstract class ESRestTestCase extends ESTestCase { * emitted in v8. Note that this message is also permitted in certain YAML test cases, it can be removed there too. * See https://github.com/elastic/elasticsearch/issues/66419 for more details. */ - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) private static final String WAIT_FOR_ACTIVE_SHARDS_DEFAULT_DEPRECATION_MESSAGE = "the default value for the ?wait_for_active_shards " + "parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' " + "to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"; diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/RestTestLegacyFeatures.java b/test/framework/src/main/java/org/elasticsearch/test/rest/RestTestLegacyFeatures.java index 14ba25402946..427398b9a8c0 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/RestTestLegacyFeatures.java +++ b/test/framework/src/main/java/org/elasticsearch/test/rest/RestTestLegacyFeatures.java @@ -26,23 +26,23 @@ import static org.elasticsearch.cluster.ClusterState.VERSION_INTRODUCING_TRANSPO */ public class RestTestLegacyFeatures implements FeatureSpecification { public static final NodeFeature ML_STATE_RESET_FALLBACK_ON_DISABLED = new NodeFeature("ml.state_reset_fallback_on_disabled"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature FEATURE_STATE_RESET_SUPPORTED = new NodeFeature("system_indices.feature_state_reset_supported"); public static final NodeFeature SYSTEM_INDICES_REST_ACCESS_ENFORCED = new NodeFeature("system_indices.rest_access_enforced"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature SYSTEM_INDICES_REST_ACCESS_DEPRECATED = new NodeFeature("system_indices.rest_access_deprecated"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature HIDDEN_INDICES_SUPPORTED = new NodeFeature("indices.hidden_supported"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature COMPONENT_TEMPLATE_SUPPORTED = new NodeFeature("indices.component_template_supported"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature DELETE_TEMPLATE_MULTIPLE_NAMES_SUPPORTED = new NodeFeature( "indices.delete_template_multiple_names_supported" ); public static final NodeFeature ML_NEW_MEMORY_FORMAT = new NodeFeature("ml.new_memory_format"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature SUPPORTS_VENDOR_XCONTENT_TYPES = new NodeFeature("rest.supports_vendor_xcontent_types"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature SUPPORTS_TRUE_BINARY_RESPONSES = new NodeFeature("rest.supports_true_binary_responses"); /** These are "pure test" features: normally we would not need them, and test for TransportVersion/fallback to Version (see for example @@ -61,20 +61,20 @@ public class RestTestLegacyFeatures implements FeatureSpecification { public static final NodeFeature DESIRED_NODE_API_SUPPORTED = new NodeFeature("desired_node_supported"); public static final NodeFeature SECURITY_UPDATE_API_KEY = new NodeFeature("security.api_key_update"); public static final NodeFeature SECURITY_BULK_UPDATE_API_KEY = new NodeFeature("security.api_key_bulk_update"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature WATCHES_VERSION_IN_META = new NodeFeature("watcher.version_in_meta"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature SECURITY_ROLE_DESCRIPTORS_OPTIONAL = new NodeFeature("security.role_descriptors_optional"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature SEARCH_AGGREGATIONS_FORCE_INTERVAL_SELECTION_DATE_HISTOGRAM = new NodeFeature( "search.aggregations.force_interval_selection_on_date_histogram" ); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature TRANSFORM_NEW_API_ENDPOINT = new NodeFeature("transform.new_api_endpoint"); // Ref: https://github.com/elastic/elasticsearch/pull/65205 - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature ML_INDICES_HIDDEN = new NodeFeature("ml.indices_hidden"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature ML_ANALYTICS_MAPPINGS = new NodeFeature("ml.analytics_mappings"); public static final NodeFeature TSDB_NEW_INDEX_FORMAT = new NodeFeature("indices.tsdb_new_format"); @@ -101,29 +101,29 @@ public class RestTestLegacyFeatures implements FeatureSpecification { public static final NodeFeature DEPRECATION_WARNINGS_LEAK_FIXED = new NodeFeature("deprecation_warnings_leak_fixed"); // QA - Full cluster restart - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature REPLICATION_OF_CLOSED_INDICES = new NodeFeature("indices.closed_replication_supported"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature TASK_INDEX_SYSTEM_INDEX = new NodeFeature("tasks.moved_to_system_index"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature SOFT_DELETES_ENFORCED = new NodeFeature("indices.soft_deletes_enforced"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature NEW_TRANSPORT_COMPRESSED_SETTING = new NodeFeature("transport.new_compressed_setting"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature SHUTDOWN_SUPPORTED = new NodeFeature("shutdown.supported"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature SERVICE_ACCOUNTS_SUPPORTED = new NodeFeature("auth.service_accounts_supported"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature TRANSFORM_SUPPORTED = new NodeFeature("transform.supported"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature SLM_SUPPORTED = new NodeFeature("slm.supported"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature DATA_STREAMS_SUPPORTED = new NodeFeature("data_stream.supported"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature NEW_DATA_STREAMS_INDEX_NAME_FORMAT = new NodeFeature("data_stream.new_index_name_format"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature DISABLE_FIELD_NAMES_FIELD_REMOVED = new NodeFeature("disable_of_field_names_field_removed"); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static final NodeFeature ML_NLP_SUPPORTED = new NodeFeature("ml.nlp_supported"); /* diff --git a/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java b/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java index 068bb8093ad1..57a6d1e09c52 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java +++ b/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java @@ -641,7 +641,7 @@ public class MockTransportService extends TransportService { // into a different class that cannot be re-serialized (i.e. JOIN_VALIDATE_ACTION_NAME), // in those cases we just copy the raw bytes back to a BytesTransportRequest. // This is only needed for the BwC for JOIN_VALIDATE_ACTION_NAME and can be removed in the next major - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) private static TransportRequest copyRawBytesForBwC(BytesStreamOutput bStream) throws IOException { return new BytesTransportRequest(bStream.bytes().streamInput()); } diff --git a/test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/ESClientYamlSuiteTestCase.java b/test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/ESClientYamlSuiteTestCase.java index db8753bab8c8..823e9e1fe9a7 100644 --- a/test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/ESClientYamlSuiteTestCase.java +++ b/test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/ESClientYamlSuiteTestCase.java @@ -240,7 +240,7 @@ public abstract class ESClientYamlSuiteTestCase extends ESRestTestCase { * Enables support for parsing the legacy version-based node_selector format. */ @Deprecated - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) public static Iterable createParametersWithLegacyNodeSelectorSupport() throws Exception { var executableSectionRegistry = new NamedXContentRegistry( Stream.concat( diff --git a/test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/section/DoSection.java b/test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/section/DoSection.java index 2d8206f75929..7cfbd2b3a57f 100644 --- a/test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/section/DoSection.java +++ b/test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/section/DoSection.java @@ -87,7 +87,7 @@ public class DoSection implements ExecutableSection { return parse(parser, false); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) @Deprecated public static DoSection parseWithLegacyNodeSelectorSupport(XContentParser parser) throws IOException { return parse(parser, true); @@ -374,7 +374,7 @@ public class DoSection implements ExecutableSection { // #84038 and #84089 mean that this assertion fails when running against < 7.17.2 and 8.0.0 released versions // This is really difficult to express just with features, so I will break it down into 2 parts: version check for v7, // and feature check for v8. This way the version check can be removed once we move to v9 - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) var fixedInV7 = executionContext.clusterHasFeature("gte_v7.17.2", false) && executionContext.clusterHasFeature("gte_v8.0.0", false) == false; var fixedProductionHeader = fixedInV7 diff --git a/test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/section/PrerequisiteSection.java b/test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/section/PrerequisiteSection.java index aca4f64ac42a..bbbf73d74e4c 100644 --- a/test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/section/PrerequisiteSection.java +++ b/test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/section/PrerequisiteSection.java @@ -328,7 +328,7 @@ public class PrerequisiteSection { parser.nextToken(); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) private static boolean parseRestCompatVersion(XContentParser parser, PrerequisiteSectionBuilder builder) throws IOException { // allow skip version only for v7 REST compatibility tests, to be removed for V9 if ("true".equals(System.getProperty("tests.restCompat"))) return parseString(parser, builder::skipIfVersion); diff --git a/test/yaml-rest-runner/src/test/java/org/elasticsearch/test/rest/yaml/section/DoSectionTests.java b/test/yaml-rest-runner/src/test/java/org/elasticsearch/test/rest/yaml/section/DoSectionTests.java index 9616fd90e581..ee8d75b4c034 100644 --- a/test/yaml-rest-runner/src/test/java/org/elasticsearch/test/rest/yaml/section/DoSectionTests.java +++ b/test/yaml-rest-runner/src/test/java/org/elasticsearch/test/rest/yaml/section/DoSectionTests.java @@ -580,7 +580,7 @@ public class DoSectionTests extends AbstractClientYamlTestFragmentParserTestCase assertThat(e.getMessage(), equalTo("the warning [foo] was both allowed and expected")); } - @UpdateForV9 // remove + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // remove public void testLegacyNodeSelectorByVersionRange() throws IOException { parser = createParser(YamlXContent.yamlXContent, """ node_selector: diff --git a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/AutoFollowCoordinatorTests.java b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/AutoFollowCoordinatorTests.java index 008792966a4b..41c1eded15ca 100644 --- a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/AutoFollowCoordinatorTests.java +++ b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/AutoFollowCoordinatorTests.java @@ -1813,7 +1813,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase { assertThat(counter.get(), equalTo(states.length)); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) @AwaitsFix(bugUrl = "ability to disable soft deletes was removed in 8.0 indexes so we can probably remove this test") public void testAutoFollowerSoftDeletesDisabled() { Client client = mock(Client.class); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/Phase.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/Phase.java index abb509805b60..b2ace46e3708 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/Phase.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/Phase.java @@ -56,7 +56,7 @@ public class Phase implements ToXContentObject, Writeable { // when the phase is read from the cluster state during startup (even before negative timevalues were strictly // disallowed) so this is a hack to treat negative `min_age`s as 0 to prevent those errors. // They will be saved as `0` so this hack can be removed once we no longer have to read cluster states from 7.x. - @UpdateForV9 // remove this hack now that we don't have to read 7.x cluster states + @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) // remove this hack now that we don't have to read 7.x cluster states final String timeValueString = p.text(); if (timeValueString.startsWith("-")) { logger.warn("phase has negative min_age value of [{}] - this will be treated as a min_age of 0", timeValueString); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/settings/GetSecuritySettingsAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/settings/GetSecuritySettingsAction.java index 4cea7526bce8..093dfabd0bf6 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/settings/GetSecuritySettingsAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/settings/GetSecuritySettingsAction.java @@ -40,7 +40,7 @@ public class GetSecuritySettingsAction { super(masterNodeTimeout); } - @UpdateForV9 // no need for bwc any more, this can be inlined + @UpdateForV9(owner = UpdateForV9.Owner.SECURITY) // no need for bwc any more, this can be inlined public static Request readFrom(StreamInput in) throws IOException { if (in.getTransportVersion().onOrAfter(TransportVersions.SECURITY_SETTINGS_REQUEST_TIMEOUTS)) { return new Request(in); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/settings/UpdateSecuritySettingsAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/settings/UpdateSecuritySettingsAction.java index c2bf1466fd41..316f16272935 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/settings/UpdateSecuritySettingsAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/settings/UpdateSecuritySettingsAction.java @@ -116,7 +116,7 @@ public class UpdateSecuritySettingsAction { this.profilesIndexSettings = Objects.requireNonNullElse(profilesIndexSettings, Collections.emptyMap()); } - @UpdateForV9 // no need for bwc any more, this can be inlined + @UpdateForV9(owner = UpdateForV9.Owner.SECURITY) // no need for bwc any more, this can be inlined public static Request readFrom(StreamInput in) throws IOException { if (in.getTransportVersion().onOrAfter(TransportVersions.SECURITY_SETTINGS_REQUEST_TIMEOUTS)) { return new Request(in); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/UpdateWatcherSettingsAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/UpdateWatcherSettingsAction.java index 5da714021eb3..19cc83cda2db 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/UpdateWatcherSettingsAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/put/UpdateWatcherSettingsAction.java @@ -59,7 +59,7 @@ public class UpdateWatcherSettingsAction extends ActionType> edges; private final List fileIds; @@ -173,7 +173,7 @@ public class GetFlamegraphResponse extends ActionResponse implements ChunkedToXC return totalSamples; } - @UpdateForV9 // change casing from Camel Case to Snake Case (requires updates in Kibana as well) + @UpdateForV9(owner = UpdateForV9.Owner.PROFILING) // change casing from Camel Case to Snake Case (requires updates in Kibana as well) @Override public Iterator toXContentChunked(ToXContent.Params params) { return Iterators.concat( diff --git a/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/GetStackTracesRequest.java b/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/GetStackTracesRequest.java index 6bd93c6df6cc..fb780a3f6f98 100644 --- a/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/GetStackTracesRequest.java +++ b/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/GetStackTracesRequest.java @@ -43,7 +43,7 @@ public class GetStackTracesRequest extends ActionRequest implements IndicesReque public static final ParseField LIMIT_FIELD = new ParseField("limit"); public static final ParseField INDICES_FIELD = new ParseField("indices"); public static final ParseField STACKTRACE_IDS_FIELD = new ParseField("stacktrace_ids_field"); - @UpdateForV9 // Remove this BWC layer and allow only AGGREGATION_FIELDS + @UpdateForV9(owner = UpdateForV9.Owner.PROFILING) // Remove this BWC layer and allow only AGGREGATION_FIELDS public static final ParseField AGGREGATION_FIELD = new ParseField("aggregation_field"); public static final ParseField AGGREGATION_FIELDS = new ParseField("aggregation_fields"); public static final ParseField REQUESTED_DURATION_FIELD = new ParseField("requested_duration"); @@ -62,7 +62,7 @@ public class GetStackTracesRequest extends ActionRequest implements IndicesReque private String[] indices; private boolean userProvidedIndices; private String stackTraceIdsField; - @UpdateForV9 // Remove this BWC layer and allow only aggregationFields + @UpdateForV9(owner = UpdateForV9.Owner.PROFILING) // Remove this BWC layer and allow only aggregationFields private String aggregationField; private String[] aggregationFields; private Double requestedDuration; diff --git a/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/GetStackTracesResponse.java b/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/GetStackTracesResponse.java index 532ad374c3c4..e9757d3806b6 100644 --- a/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/GetStackTracesResponse.java +++ b/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/GetStackTracesResponse.java @@ -30,10 +30,10 @@ public class GetStackTracesResponse extends ActionResponse implements ChunkedToX private final Map stackFrames; @Nullable private final Map executables; - @UpdateForV9 // remove this field - it is unused in Kibana + @UpdateForV9(owner = UpdateForV9.Owner.PROFILING) // remove this field - it is unused in Kibana @Nullable private final Map stackTraceEvents; - @UpdateForV9 // remove this field - it is unused in Kibana + @UpdateForV9(owner = UpdateForV9.Owner.PROFILING) // remove this field - it is unused in Kibana private final int totalFrames; private final double samplingRate; private final long totalSamples; diff --git a/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/HostMetadata.java b/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/HostMetadata.java index acfcd228b731..65934626c9ec 100644 --- a/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/HostMetadata.java +++ b/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/HostMetadata.java @@ -31,7 +31,8 @@ final class HostMetadata implements ToXContentObject { this.profilingNumCores = profilingNumCores != null ? profilingNumCores : DEFAULT_PROFILING_NUM_CORES; } - @UpdateForV9 // remove fallback to the "profiling.host.machine" field and remove it from the component template "profiling-hosts". + @UpdateForV9(owner = UpdateForV9.Owner.PROFILING) + // remove fallback to the "profiling.host.machine" field and remove it from the component template "profiling-hosts". public static HostMetadata fromSource(Map source) { if (source != null) { String hostID = (String) source.get("host.id"); diff --git a/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/InstanceType.java b/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/InstanceType.java index 5628b64ea67b..427cf07af7be 100644 --- a/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/InstanceType.java +++ b/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/InstanceType.java @@ -74,7 +74,7 @@ final class InstanceType implements ToXContentObject { return new InstanceType(provider, region, null); } - @UpdateForV9 // remove this method + @UpdateForV9(owner = UpdateForV9.Owner.PROFILING) // remove this method private static InstanceType fromObsoleteHostSource(Map source) { // Check and handle AWS. String region = (String) source.get("ec2.placement.region"); diff --git a/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/SubGroup.java b/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/SubGroup.java index 25ba70ee7185..513ec8fe1bc4 100644 --- a/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/SubGroup.java +++ b/x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/action/SubGroup.java @@ -19,7 +19,7 @@ import java.util.Objects; public class SubGroup implements ToXContentFragment { private final String name; private Long count; - @UpdateForV9 // remove legacy XContent rendering + @UpdateForV9(owner = UpdateForV9.Owner.PROFILING) // remove legacy XContent rendering private final boolean renderLegacyXContent; private final Map subgroups; diff --git a/x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/allocation/decider/SearchableSnapshotEnableAllocationDecider.java b/x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/allocation/decider/SearchableSnapshotEnableAllocationDecider.java index 9fa76c681baf..1e360fc2f350 100644 --- a/x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/allocation/decider/SearchableSnapshotEnableAllocationDecider.java +++ b/x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/allocation/decider/SearchableSnapshotEnableAllocationDecider.java @@ -28,7 +28,8 @@ public class SearchableSnapshotEnableAllocationDecider extends AllocationDecider * ongoing is determined by cluster.routing.allocation.enable=primaries. Notice that other values for that setting except "all" mean * that no searchable snapshots are allocated anyway. */ - @UpdateForV9 // xpack.searchable.snapshot.allocate_on_rolling_restart was only temporary, remove it in the next major + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) + // xpack.searchable.snapshot.allocate_on_rolling_restart was only temporary, remove it in the next major public static final Setting SEARCHABLE_SNAPSHOTS_ALLOCATE_ON_ROLLING_RESTART = Setting.boolSetting( "xpack.searchable.snapshot.allocate_on_rolling_restart", false, diff --git a/x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/cache/blob/CachedBlob.java b/x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/cache/blob/CachedBlob.java index aba553e563c3..a434ac39f59e 100644 --- a/x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/cache/blob/CachedBlob.java +++ b/x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/cache/blob/CachedBlob.java @@ -60,7 +60,8 @@ public class CachedBlob implements ToXContent { @Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { - @UpdateForV9 // we can remove the version field when we no longer need to keep compatibility with <8.12 + @UpdateForV9(owner = UpdateForV9.Owner.SEARCH_FOUNDATIONS) + // we can remove the version field when we no longer need to keep compatibility with <8.12 final int version = Version.CURRENT.id; builder.startObject(); { diff --git a/x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/xpack/searchablesnapshots/upgrade/SearchableSnapshotIndexMetadataUpgraderTests.java b/x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/xpack/searchablesnapshots/upgrade/SearchableSnapshotIndexMetadataUpgraderTests.java index bd090b528bb9..8de5a3710284 100644 --- a/x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/xpack/searchablesnapshots/upgrade/SearchableSnapshotIndexMetadataUpgraderTests.java +++ b/x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/xpack/searchablesnapshots/upgrade/SearchableSnapshotIndexMetadataUpgraderTests.java @@ -29,7 +29,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.sameInstance; -@UpdateForV9 +@UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) @LuceneTestCase.AwaitsFix(bugUrl = "this testing a number of pre 8.0 upgrade scenarios so needs updating or removal for 9.0") public class SearchableSnapshotIndexMetadataUpgraderTests extends ESTestCase { diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityImplicitBehaviorBootstrapCheckTests.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityImplicitBehaviorBootstrapCheckTests.java index 01715cde33cf..85e8d6dd3812 100644 --- a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityImplicitBehaviorBootstrapCheckTests.java +++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityImplicitBehaviorBootstrapCheckTests.java @@ -30,7 +30,7 @@ import static org.mockito.Mockito.mock; public class SecurityImplicitBehaviorBootstrapCheckTests extends AbstractBootstrapCheckTestCase { - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.SECURITY) @AwaitsFix(bugUrl = "requires updates for version 9.0 bump") public void testUpgradeFrom8xWithImplicitSecuritySettings() throws Exception { final BuildVersion previousVersion = toBuildVersion(VersionUtils.randomVersionBetween(random(), Version.V_8_0_0, null)); @@ -46,7 +46,7 @@ public class SecurityImplicitBehaviorBootstrapCheckTests extends AbstractBootstr assertThat(result.isSuccess(), is(true)); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.SECURITY) @AwaitsFix(bugUrl = "requires updates for version 9.0 bump") public void testUpgradeFrom8xWithExplicitSecuritySettings() throws Exception { final BuildVersion previousVersion = toBuildVersion(VersionUtils.randomVersionBetween(random(), Version.V_8_0_0, null)); diff --git a/x-pack/plugin/shutdown/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/FullClusterRestartIT.java b/x-pack/plugin/shutdown/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/FullClusterRestartIT.java index 4c96cc77a852..8125c8d9d52a 100644 --- a/x-pack/plugin/shutdown/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/FullClusterRestartIT.java +++ b/x-pack/plugin/shutdown/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/FullClusterRestartIT.java @@ -90,7 +90,7 @@ public class FullClusterRestartIT extends ParameterizedFullClusterRestartTestCas @Before public void checkClusterVersion() { - @UpdateForV9 // always true + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // always true var originalClusterSupportsShutdown = oldClusterHasFeature(RestTestLegacyFeatures.SHUTDOWN_SUPPORTED); assumeTrue("no shutdown in versions before 7.15", originalClusterSupportsShutdown); } diff --git a/x-pack/plugin/snapshot-based-recoveries/src/test/java/org/elasticsearch/xpack/snapshotbasedrecoveries/recovery/plan/SnapshotsRecoveryPlannerServiceTests.java b/x-pack/plugin/snapshot-based-recoveries/src/test/java/org/elasticsearch/xpack/snapshotbasedrecoveries/recovery/plan/SnapshotsRecoveryPlannerServiceTests.java index 449edd8f40ee..485a482467f1 100644 --- a/x-pack/plugin/snapshot-based-recoveries/src/test/java/org/elasticsearch/xpack/snapshotbasedrecoveries/recovery/plan/SnapshotsRecoveryPlannerServiceTests.java +++ b/x-pack/plugin/snapshot-based-recoveries/src/test/java/org/elasticsearch/xpack/snapshotbasedrecoveries/recovery/plan/SnapshotsRecoveryPlannerServiceTests.java @@ -203,7 +203,7 @@ public class SnapshotsRecoveryPlannerServiceTests extends ESTestCase { }); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) @AwaitsFix(bugUrl = "this is testing pre-7.0 upgrade behavior so probably needs some updating") public void testLogicallyEquivalentSnapshotIsUsedEvenIfFilesAreDifferent() throws Exception { createStore(store -> { @@ -390,7 +390,7 @@ public class SnapshotsRecoveryPlannerServiceTests extends ESTestCase { }); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_COORDINATION) @AwaitsFix(bugUrl = "this is testing v7.14 compat functionality so can probably be removed") public void testFallbacksToSourceOnlyPlanIfTargetNodeIsInUnsupportedVersion() throws Exception { createStore(store -> { diff --git a/x-pack/plugin/spatial/src/internalClusterTest/java/org/elasticsearch/xpack/spatial/search/GeoBoundingBoxQueryLegacyGeoShapeWithDocValuesIT.java b/x-pack/plugin/spatial/src/internalClusterTest/java/org/elasticsearch/xpack/spatial/search/GeoBoundingBoxQueryLegacyGeoShapeWithDocValuesIT.java index 2c92d5387d87..3f496e1d320c 100644 --- a/x-pack/plugin/spatial/src/internalClusterTest/java/org/elasticsearch/xpack/spatial/search/GeoBoundingBoxQueryLegacyGeoShapeWithDocValuesIT.java +++ b/x-pack/plugin/spatial/src/internalClusterTest/java/org/elasticsearch/xpack/spatial/search/GeoBoundingBoxQueryLegacyGeoShapeWithDocValuesIT.java @@ -22,7 +22,7 @@ import java.io.IOException; import java.util.Collection; import java.util.Collections; -@UpdateForV9 +@UpdateForV9(owner = UpdateForV9.Owner.SEARCH_ANALYTICS) @LuceneTestCase.AwaitsFix(bugUrl = "this is testing legacy functionality so can likely be removed in 9.0") public class GeoBoundingBoxQueryLegacyGeoShapeWithDocValuesIT extends GeoBoundingBoxQueryIntegTestCase { diff --git a/x-pack/plugin/spatial/src/internalClusterTest/java/org/elasticsearch/xpack/spatial/search/LegacyGeoShapeWithDocValuesIT.java b/x-pack/plugin/spatial/src/internalClusterTest/java/org/elasticsearch/xpack/spatial/search/LegacyGeoShapeWithDocValuesIT.java index b48f5a8c17e9..66954cbf4306 100644 --- a/x-pack/plugin/spatial/src/internalClusterTest/java/org/elasticsearch/xpack/spatial/search/LegacyGeoShapeWithDocValuesIT.java +++ b/x-pack/plugin/spatial/src/internalClusterTest/java/org/elasticsearch/xpack/spatial/search/LegacyGeoShapeWithDocValuesIT.java @@ -29,7 +29,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; import static org.hamcrest.Matchers.containsString; -@UpdateForV9 +@UpdateForV9(owner = UpdateForV9.Owner.SEARCH_ANALYTICS) @LuceneTestCase.AwaitsFix(bugUrl = "this is testing legacy functionality so can likely be removed in 9.0") public class LegacyGeoShapeWithDocValuesIT extends GeoShapeIntegTestCase { diff --git a/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapperTests.java b/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapperTests.java index 0e04cfe6757b..4b13a7bf1f82 100644 --- a/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapperTests.java +++ b/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapperTests.java @@ -280,7 +280,7 @@ public class GeoShapeWithDocValuesFieldMapperTests extends GeoFieldMapperTests { ); } - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.SEARCH_ANALYTICS) @AwaitsFix(bugUrl = "this is testing legacy functionality so can likely be removed in 9.0") public void testGeoShapeLegacyMerge() throws Exception { IndexVersion version = IndexVersionUtils.randomPreviousCompatibleVersion(random(), IndexVersions.V_8_0_0); diff --git a/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/index/query/LegacyGeoShapeWithDocValuesQueryTests.java b/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/index/query/LegacyGeoShapeWithDocValuesQueryTests.java index de66d0b822c9..f26dba2f3398 100644 --- a/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/index/query/LegacyGeoShapeWithDocValuesQueryTests.java +++ b/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/index/query/LegacyGeoShapeWithDocValuesQueryTests.java @@ -41,7 +41,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitC import static org.elasticsearch.xcontent.XContentFactory.jsonBuilder; import static org.hamcrest.Matchers.containsString; -@UpdateForV9 +@UpdateForV9(owner = UpdateForV9.Owner.SEARCH_ANALYTICS) @LuceneTestCase.AwaitsFix(bugUrl = "this is testing legacy functionality so can likely be removed in 9.0") public class LegacyGeoShapeWithDocValuesQueryTests extends GeoShapeQueryTestCase { diff --git a/x-pack/plugin/text-structure/src/main/java/org/elasticsearch/xpack/textstructure/rest/RestFindStructureAction.java b/x-pack/plugin/text-structure/src/main/java/org/elasticsearch/xpack/textstructure/rest/RestFindStructureAction.java index 03b18744eba2..5078572dee5f 100644 --- a/x-pack/plugin/text-structure/src/main/java/org/elasticsearch/xpack/textstructure/rest/RestFindStructureAction.java +++ b/x-pack/plugin/text-structure/src/main/java/org/elasticsearch/xpack/textstructure/rest/RestFindStructureAction.java @@ -27,7 +27,7 @@ import static org.elasticsearch.xpack.textstructure.TextStructurePlugin.BASE_PAT @ServerlessScope(Scope.INTERNAL) public class RestFindStructureAction extends BaseRestHandler { - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.MACHINE_LEARNING) // one or more routes use ".replaces" with RestApiVersion.V_8 which will require use of REST API compatibility headers to access // that route in v9. It is unclear if this was intentional for v9, and the code has been updated to ".deprecateAndKeep" which will // continue to emit deprecations warnings but will not require any special headers to access the API in v9. diff --git a/x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/FullClusterRestartIT.java b/x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/FullClusterRestartIT.java index 807986b08c4d..303f799e0d9c 100644 --- a/x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/FullClusterRestartIT.java +++ b/x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/FullClusterRestartIT.java @@ -295,7 +295,7 @@ public class FullClusterRestartIT extends AbstractXpackFullClusterRestartTestCas } public void testServiceAccountApiKey() throws IOException { - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.SECURITY) var originalClusterSupportsServiceAccounts = oldClusterHasFeature(RestTestLegacyFeatures.SERVICE_ACCOUNTS_SUPPORTED); assumeTrue("no service accounts in versions before 7.13", originalClusterSupportsServiceAccounts); @@ -524,7 +524,7 @@ public class FullClusterRestartIT extends AbstractXpackFullClusterRestartTestCas } public void testTransformLegacyTemplateCleanup() throws Exception { - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.MACHINE_LEARNING) var originalClusterSupportsTransform = oldClusterHasFeature(RestTestLegacyFeatures.TRANSFORM_SUPPORTED); assumeTrue("Before 7.2 transforms didn't exist", originalClusterSupportsTransform); @@ -606,7 +606,7 @@ public class FullClusterRestartIT extends AbstractXpackFullClusterRestartTestCas } public void testSlmPolicyAndStats() throws IOException { - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) var originalClusterSupportsSlm = oldClusterHasFeature(RestTestLegacyFeatures.SLM_SUPPORTED); SnapshotLifecyclePolicy slmPolicy = new SnapshotLifecyclePolicy( @@ -959,10 +959,10 @@ public class FullClusterRestartIT extends AbstractXpackFullClusterRestartTestCas @SuppressWarnings("unchecked") public void testDataStreams() throws Exception { - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) var originalClusterSupportsDataStreams = oldClusterHasFeature(RestTestLegacyFeatures.DATA_STREAMS_SUPPORTED); - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) var originalClusterDataStreamHasDateInIndexName = oldClusterHasFeature(RestTestLegacyFeatures.NEW_DATA_STREAMS_INDEX_NAME_FORMAT); assumeTrue("no data streams in versions before 7.9.0", originalClusterSupportsDataStreams); @@ -1012,7 +1012,7 @@ public class FullClusterRestartIT extends AbstractXpackFullClusterRestartTestCas /** * Tests that a single document survives. Super basic smoke test. */ - @UpdateForV9 // Can be removed + @UpdateForV9(owner = UpdateForV9.Owner.SEARCH_FOUNDATIONS) // Can be removed public void testDisableFieldNameField() throws IOException { assumeFalse( "can only disable field names field before 8.0", diff --git a/x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/MLModelDeploymentFullClusterRestartIT.java b/x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/MLModelDeploymentFullClusterRestartIT.java index abc09a6563ee..3e57faea848b 100644 --- a/x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/MLModelDeploymentFullClusterRestartIT.java +++ b/x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/MLModelDeploymentFullClusterRestartIT.java @@ -93,7 +93,7 @@ public class MLModelDeploymentFullClusterRestartIT extends AbstractXpackFullClus } public void testDeploymentSurvivesRestart() throws Exception { - @UpdateForV9 // condition will always be true from v8, can be removed + @UpdateForV9(owner = UpdateForV9.Owner.MACHINE_LEARNING) // condition will always be true from v8, can be removed var originalClusterSupportsNlpModels = oldClusterHasFeature(RestTestLegacyFeatures.ML_NLP_SUPPORTED); assumeTrue("NLP model deployments added in 8.0", originalClusterSupportsNlpModels); diff --git a/x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/WatcherMappingUpdateIT.java b/x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/WatcherMappingUpdateIT.java index 768d74c1b68e..767f27d4e4f9 100644 --- a/x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/WatcherMappingUpdateIT.java +++ b/x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/WatcherMappingUpdateIT.java @@ -28,7 +28,8 @@ import java.util.concurrent.TimeUnit; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; -@UpdateForV9 // Remove the whole test suite (superseded by SystemIndexMappingUpdateServiceIT#testSystemIndexManagerUpgradesMappings) +@UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) +// Remove the whole test suite (superseded by SystemIndexMappingUpdateServiceIT#testSystemIndexManagerUpgradesMappings) public class WatcherMappingUpdateIT extends AbstractXpackFullClusterRestartTestCase { public WatcherMappingUpdateIT(@Name("cluster") FullClusterRestartUpgradeStatus upgradeStatus) { diff --git a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/AbstractUpgradeTestCase.java b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/AbstractUpgradeTestCase.java index d7cab65df1ac..af67ab5751e9 100644 --- a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/AbstractUpgradeTestCase.java +++ b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/AbstractUpgradeTestCase.java @@ -50,7 +50,7 @@ public abstract class AbstractUpgradeTestCase extends ESRestTestCase { } @Deprecated(forRemoval = true) - @UpdateForV9 + @UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // Tests should be reworked to rely on features from the current cluster (old, mixed or upgraded). // Version test against the original cluster will be removed protected static boolean isOriginalClusterVersionAtLeast(Version supportedVersion) { diff --git a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MLModelDeploymentsUpgradeIT.java b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MLModelDeploymentsUpgradeIT.java index 553d5e7425de..4de2c610e5c4 100644 --- a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MLModelDeploymentsUpgradeIT.java +++ b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MLModelDeploymentsUpgradeIT.java @@ -101,7 +101,7 @@ public class MLModelDeploymentsUpgradeIT extends AbstractUpgradeTestCase { } public void testTrainedModelDeployment() throws Exception { - @UpdateForV9 // upgrade will always be from v8, condition can be removed + @UpdateForV9(owner = UpdateForV9.Owner.MACHINE_LEARNING) // upgrade will always be from v8, condition can be removed var originalClusterAtLeastV8 = isOriginalClusterVersionAtLeast(Version.V_8_0_0); // These tests assume the original cluster is v8 - testing for features on the _current_ cluster will break for NEW assumeTrue("NLP model deployments added in 8.0", originalClusterAtLeastV8); @@ -140,7 +140,7 @@ public class MLModelDeploymentsUpgradeIT extends AbstractUpgradeTestCase { } public void testTrainedModelDeploymentStopOnMixedCluster() throws Exception { - @UpdateForV9 // upgrade will always be from v8, condition can be removed + @UpdateForV9(owner = UpdateForV9.Owner.MACHINE_LEARNING) // upgrade will always be from v8, condition can be removed var originalClusterAtLeastV8 = isOriginalClusterVersionAtLeast(Version.V_8_0_0); // These tests assume the original cluster is v8 - testing for features on the _current_ cluster will break for NEW assumeTrue("NLP model deployments added in 8.0", originalClusterAtLeastV8); diff --git a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MlAssignmentPlannerUpgradeIT.java b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MlAssignmentPlannerUpgradeIT.java index 88118f6c2727..7cefaa2edb38 100644 --- a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MlAssignmentPlannerUpgradeIT.java +++ b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MlAssignmentPlannerUpgradeIT.java @@ -71,7 +71,7 @@ public class MlAssignmentPlannerUpgradeIT extends AbstractUpgradeTestCase { @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/101926") public void testMlAssignmentPlannerUpgrade() throws Exception { - @UpdateForV9 // upgrade will always be from v8, condition can be removed + @UpdateForV9(owner = UpdateForV9.Owner.MACHINE_LEARNING) // upgrade will always be from v8, condition can be removed var originalClusterAtLeastV8 = isOriginalClusterVersionAtLeast(Version.V_8_0_0); // These tests assume the original cluster is v8 - testing for features on the _current_ cluster will break for NEW assumeTrue("NLP model deployments added in 8.0", originalClusterAtLeastV8);