From a4b4a9f08d0c34e5ff788efbc6a020233675721b Mon Sep 17 00:00:00 2001 From: Pat Whelan Date: Thu, 6 Mar 2025 14:03:07 -0500 Subject: [PATCH 1/2] [Deprecation] Update URL (#124259) Replace the URL with the new updated docs URL. Should probably migrate to ReferenceDocs after 9.1. --- .../deprecation/IndexDeprecationChecker.java | 8 +++--- .../IndexDeprecationCheckerTests.java | 28 +++++++------------ 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecker.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecker.java index 2b799d9847988..d0d2d155c5a4a 100644 --- a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecker.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecker.java @@ -103,7 +103,7 @@ private DeprecationIssue oldIndicesCheck( return new DeprecationIssue( DeprecationIssue.Level.CRITICAL, "One or more Transforms write to this index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-9.0.html" + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html" + "#breaking_90_transform_destination_index", Strings.format( "This index was created in version [%s] and requires action before upgrading to 9.0. The following transforms are " @@ -119,7 +119,7 @@ private DeprecationIssue oldIndicesCheck( return new DeprecationIssue( DeprecationIssue.Level.CRITICAL, "Old index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-9.0.html", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html", "This index has version: " + currentCompatibilityVersion.toReleaseVersion(), false, Map.of("reindex_required", true) @@ -146,7 +146,7 @@ private DeprecationIssue ignoredOldIndicesCheck( return new DeprecationIssue( DeprecationIssue.Level.WARNING, "One or more Transforms write to this old index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-9.0.html" + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html" + "#breaking_90_transform_destination_index", Strings.format( "This index was created in version [%s] and will be supported as a read-only index in 9.0. The following " @@ -162,7 +162,7 @@ private DeprecationIssue ignoredOldIndicesCheck( return new DeprecationIssue( DeprecationIssue.Level.WARNING, "Old index with a compatibility version < 8.0 has been ignored", - "https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-9.0.html", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html", "This read-only index has version: " + currentCompatibilityVersion.toReleaseVersion() + " and will be supported as read-only in 9.0", diff --git a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationCheckerTests.java b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationCheckerTests.java index b67cedf7224b6..6a8e0ba25f0dd 100644 --- a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationCheckerTests.java +++ b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationCheckerTests.java @@ -80,7 +80,7 @@ public void testOldIndicesCheck() { DeprecationIssue expected = new DeprecationIssue( DeprecationIssue.Level.CRITICAL, "Old index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-9.0.html", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html", "This index has version: " + OLD_VERSION.toReleaseVersion(), false, singletonMap("reindex_required", true) @@ -104,8 +104,7 @@ public void testOldTransformIndicesCheck() { var expected = new DeprecationIssue( DeprecationIssue.Level.CRITICAL, "One or more Transforms write to this index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-9.0.html" - + "#breaking_90_transform_destination_index", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index", "This index was created in version [" + OLD_VERSION.toReleaseVersion() + "] and requires action before upgrading to 9.0. " @@ -131,8 +130,7 @@ public void testOldIndicesCheckWithMultipleTransforms() { var expected = new DeprecationIssue( DeprecationIssue.Level.CRITICAL, "One or more Transforms write to this index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-9.0.html" - + "#breaking_90_transform_destination_index", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index", "This index was created in version [" + OLD_VERSION.toReleaseVersion() + "] and requires action before upgrading to 9.0. " @@ -162,8 +160,7 @@ public void testMultipleOldIndicesCheckWithTransforms() { new DeprecationIssue( DeprecationIssue.Level.CRITICAL, "One or more Transforms write to this index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-9.0.html" - + "#breaking_90_transform_destination_index", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index", "This index was created in version [" + OLD_VERSION.toReleaseVersion() + "] and requires action before upgrading to 9.0. " @@ -178,8 +175,7 @@ public void testMultipleOldIndicesCheckWithTransforms() { new DeprecationIssue( DeprecationIssue.Level.CRITICAL, "One or more Transforms write to this index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-9.0.html" - + "#breaking_90_transform_destination_index", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index", "This index was created in version [" + OLD_VERSION.toReleaseVersion() + "] and requires action before upgrading to 9.0. " @@ -285,7 +281,7 @@ public void testOldIndicesIgnoredWarningCheck() { DeprecationIssue expected = new DeprecationIssue( DeprecationIssue.Level.WARNING, "Old index with a compatibility version < 8.0 has been ignored", - "https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-9.0.html", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html", "This read-only index has version: " + OLD_VERSION.toReleaseVersion() + " and will be supported as read-only in 9.0", false, singletonMap("reindex_required", true) @@ -336,8 +332,7 @@ public void testOldTransformIndicesIgnoredCheck() { var expected = new DeprecationIssue( DeprecationIssue.Level.WARNING, "One or more Transforms write to this old index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-9.0.html" - + "#breaking_90_transform_destination_index", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index", "This index was created in version [" + OLD_VERSION.toReleaseVersion() + "] and will be supported as a read-only index in 9.0. " @@ -363,8 +358,7 @@ public void testOldIndicesIgnoredCheckWithMultipleTransforms() { var expected = new DeprecationIssue( DeprecationIssue.Level.WARNING, "One or more Transforms write to this old index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-9.0.html" - + "#breaking_90_transform_destination_index", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index", "This index was created in version [" + OLD_VERSION.toReleaseVersion() + "] and will be supported as a read-only index in 9.0. " @@ -394,8 +388,7 @@ public void testMultipleOldIndicesIgnoredCheckWithTransforms() { new DeprecationIssue( DeprecationIssue.Level.WARNING, "One or more Transforms write to this old index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-9.0.html" - + "#breaking_90_transform_destination_index", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index", "This index was created in version [" + OLD_VERSION.toReleaseVersion() + "] and will be supported as a read-only index in 9.0. " @@ -410,8 +403,7 @@ public void testMultipleOldIndicesIgnoredCheckWithTransforms() { new DeprecationIssue( DeprecationIssue.Level.WARNING, "One or more Transforms write to this old index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-9.0.html" - + "#breaking_90_transform_destination_index", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index", "This index was created in version [" + OLD_VERSION.toReleaseVersion() + "] and will be supported as a read-only index in 9.0. " From 32499397371b7362eb5d58a5229f1e3c2d8299bc Mon Sep 17 00:00:00 2001 From: Pat Whelan Date: Thu, 6 Mar 2025 14:55:39 -0500 Subject: [PATCH 2/2] Fix checkstyle --- .../deprecation/IndexDeprecationCheckerTests.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationCheckerTests.java b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationCheckerTests.java index 6a8e0ba25f0dd..270fedb78bd51 100644 --- a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationCheckerTests.java +++ b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationCheckerTests.java @@ -160,7 +160,8 @@ public void testMultipleOldIndicesCheckWithTransforms() { new DeprecationIssue( DeprecationIssue.Level.CRITICAL, "One or more Transforms write to this index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html" + + "#breaking_90_transform_destination_index", "This index was created in version [" + OLD_VERSION.toReleaseVersion() + "] and requires action before upgrading to 9.0. " @@ -175,7 +176,8 @@ public void testMultipleOldIndicesCheckWithTransforms() { new DeprecationIssue( DeprecationIssue.Level.CRITICAL, "One or more Transforms write to this index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html" + + "#breaking_90_transform_destination_index", "This index was created in version [" + OLD_VERSION.toReleaseVersion() + "] and requires action before upgrading to 9.0. " @@ -388,7 +390,8 @@ public void testMultipleOldIndicesIgnoredCheckWithTransforms() { new DeprecationIssue( DeprecationIssue.Level.WARNING, "One or more Transforms write to this old index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html" + + "#breaking_90_transform_destination_index", "This index was created in version [" + OLD_VERSION.toReleaseVersion() + "] and will be supported as a read-only index in 9.0. " @@ -403,7 +406,8 @@ public void testMultipleOldIndicesIgnoredCheckWithTransforms() { new DeprecationIssue( DeprecationIssue.Level.WARNING, "One or more Transforms write to this old index with a compatibility version < 8.0", - "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html#breaking_90_transform_destination_index", + "https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html" + + "#breaking_90_transform_destination_index", "This index was created in version [" + OLD_VERSION.toReleaseVersion() + "] and will be supported as a read-only index in 9.0. "