Skip to content

Commit dac64a1

Browse files
lukewhitingelasticsearchmachine
andauthored
[8.x] Update Documentation URLs (#125089) (#127216)
* Update Documentation URLs (#125089) * ES-9508 Update Data Steam Deprecation notice text and URL Also updates the text to use a dynamic placeholder for version number so code can be backported without change * ES-9508 ILM Policy deprecation checker URL to short URL * ES-9508 Index version deprecation notices * ES-9508 Translog Retention Deprecation URL * ES-9508 Index data path deprecation URL * ES-9508 Simplefs deprecation * ES-9508 Datafeed deprecated options notice * ES-9508 Datafeed deprecated aggregation options notice * ES-9508 Model snapshot version deprecation notice * ES-9508 Shared data path setting deprecation * ES-9508 Realm prefix deprecation * ES-9508 eql enable deprecation * ES-9508 Watcher setting deprecation * ES-9508 Formatting changes * Update x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DataStreamDeprecationChecker.java Co-authored-by: Mary Gouseti <[email protected]> * Update x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DataStreamDeprecationCheckerTests.java Co-authored-by: Mary Gouseti <[email protected]> * ES-9508 Update index and data stream deprecation notices to be backport proof * [CI] Auto commit changes from spotless --------- Co-authored-by: Mary Gouseti <[email protected]> Co-authored-by: elasticsearchmachine <[email protected]> (cherry picked from commit 68b8145) # Conflicts: # x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DataStreamDeprecationChecker.java # x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecker.java # x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DataStreamDeprecationCheckerTests.java # x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationCheckerTests.java * Test fixup for backport * [CI] Auto commit changes from spotless --------- Co-authored-by: elasticsearchmachine <[email protected]>
1 parent b0e1903 commit dac64a1

File tree

9 files changed

+106
-88
lines changed

9 files changed

+106
-88
lines changed

x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DataStreamDeprecationChecker.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
package org.elasticsearch.xpack.deprecation;
99

10+
import org.elasticsearch.Version;
1011
import org.elasticsearch.action.support.IndicesOptions;
1112
import org.elasticsearch.cluster.ClusterState;
1213
import org.elasticsearch.cluster.metadata.DataStream;
@@ -93,9 +94,9 @@ static DeprecationIssue oldIndicesCheck(DataStream dataStream, ClusterState clus
9394
if (indicesNeedingUpgrade.isEmpty() == false) {
9495
return new DeprecationIssue(
9596
DeprecationIssue.Level.CRITICAL,
96-
"Old data stream with a compatibility version < 8.0",
97-
"https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-8.0.html#breaking-changes-8.0",
98-
"This data stream has backing indices that were created before Elasticsearch 8.0.0",
97+
"Old data stream with a compatibility version < " + Version.CURRENT.major + ".0",
98+
"https://ela.st/es-deprecation-ds-reindex",
99+
"This data stream has backing indices that were created before Elasticsearch " + Version.CURRENT.major + ".0",
99100
false,
100101
ofEntries(
101102
entry("reindex_required", true),
@@ -115,10 +116,11 @@ static DeprecationIssue ignoredOldIndicesCheck(DataStream dataStream, ClusterSta
115116
if (ignoredIndices.isEmpty() == false) {
116117
return new DeprecationIssue(
117118
DeprecationIssue.Level.WARNING,
118-
"Old data stream with a compatibility version < 8.0 Have Been Ignored",
119-
"https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-8.0.html#breaking-changes-8.0",
120-
"This data stream has read only backing indices that were created before Elasticsearch 8.0.0 and have been marked as "
121-
+ "OK to remain read-only after upgrade",
119+
"Old data stream with a compatibility version < " + Version.CURRENT.major + ".0 has Been Ignored",
120+
"https://ela.st/es-deprecation-ds-reindex",
121+
"This data stream has read only backing indices that were created before Elasticsearch "
122+
+ Version.CURRENT.major
123+
+ ".0 and have been marked as OK to remain read-only after upgrade",
122124
false,
123125
ofEntries(
124126
entry("reindex_required", false),

x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IlmPolicyDeprecationChecker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ private DeprecationIssue checkFrozenAction(LifecyclePolicy policy) {
104104
"ILM policy ["
105105
+ policy.getName()
106106
+ "] contains the action 'freeze' that is deprecated and will be removed in a future version.",
107-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/frozen-indices.html",
107+
"https://ela.st/es-deprecation-7-frozen-index",
108108
"This action is already a noop so it can be safely removed, because frozen indices no longer offer any advantages."
109109
+ " Consider cold or frozen tiers in place of frozen indices.",
110110
false,

x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecker.java

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77
package org.elasticsearch.xpack.deprecation;
88

9+
import org.elasticsearch.Version;
910
import org.elasticsearch.cluster.ClusterState;
1011
import org.elasticsearch.cluster.metadata.IndexMetadata;
1112
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
@@ -102,14 +103,14 @@ private DeprecationIssue oldIndicesCheck(
102103
if (transforms.isEmpty() == false) {
103104
return new DeprecationIssue(
104105
DeprecationIssue.Level.CRITICAL,
105-
"One or more Transforms write to this index with a compatibility version < 8.0",
106-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html"
107-
+ "#breaking_90_transform_destination_index",
106+
"One or more Transforms write to this index with a compatibility version < " + Version.CURRENT.major + ".0",
107+
"https://ela.st/es-deprecation-9-transform-destination-index",
108108
Strings.format(
109-
"This index was created in version [%s] and requires action before upgrading to 9.0. The following transforms are "
109+
"This index was created in version [%s] and requires action before upgrading to %d.0. The following transforms are "
110110
+ "configured to write to this index: [%s]. Refer to the migration guide to learn more about how to prepare "
111111
+ "transforms destination indices for your upgrade.",
112112
currentCompatibilityVersion.toReleaseVersion(),
113+
Version.CURRENT.major,
113114
String.join(", ", transforms)
114115
),
115116
false,
@@ -118,8 +119,8 @@ private DeprecationIssue oldIndicesCheck(
118119
} else {
119120
return new DeprecationIssue(
120121
DeprecationIssue.Level.CRITICAL,
121-
"Old index with a compatibility version < 8.0",
122-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html",
122+
"Old index with a compatibility version < " + Version.CURRENT.major + ".0",
123+
"https://ela.st/es-deprecation-9-index-version",
123124
"This index has version: " + currentCompatibilityVersion.toReleaseVersion(),
124125
false,
125126
Map.of("reindex_required", true)
@@ -145,14 +146,14 @@ private DeprecationIssue ignoredOldIndicesCheck(
145146
if (transforms.isEmpty() == false) {
146147
return new DeprecationIssue(
147148
DeprecationIssue.Level.WARNING,
148-
"One or more Transforms write to this old index with a compatibility version < 8.0",
149-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html"
150-
+ "#breaking_90_transform_destination_index",
149+
"One or more Transforms write to this old index with a compatibility version < " + Version.CURRENT.major + ".0",
150+
"https://ela.st/es-deprecation-9-transform-destination-index",
151151
Strings.format(
152-
"This index was created in version [%s] and will be supported as a read-only index in 9.0. The following "
152+
"This index was created in version [%s] and will be supported as a read-only index in %d.0. The following "
153153
+ "transforms are no longer able to write to this index: [%s]. Refer to the migration guide to learn more "
154154
+ "about how to handle your transforms destination indices.",
155155
currentCompatibilityVersion.toReleaseVersion(),
156+
Version.CURRENT.major,
156157
String.join(", ", transforms)
157158
),
158159
false,
@@ -161,11 +162,14 @@ private DeprecationIssue ignoredOldIndicesCheck(
161162
} else {
162163
return new DeprecationIssue(
163164
DeprecationIssue.Level.WARNING,
164-
"Old index with a compatibility version < 8.0 has been ignored",
165-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html",
165+
"Old index with a compatibility version < " + Version.CURRENT.major + ".0 has been ignored",
166+
"https://ela.st/es-deprecation-9-index-version",
166167
"This read-only index has version: "
167168
+ currentCompatibilityVersion.toReleaseVersion()
168-
+ " and will be supported as read-only in 9.0",
169+
+ " and will be supported as read-only in "
170+
+ Version.CURRENT.major
171+
+ 1
172+
+ ".0",
169173
false,
170174
Map.of("reindex_required", true)
171175
);
@@ -198,7 +202,7 @@ private DeprecationIssue translogRetentionSettingCheck(
198202
return new DeprecationIssue(
199203
DeprecationIssue.Level.WARNING,
200204
"translog retention settings are ignored",
201-
"https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-translog.html",
205+
"https://ela.st/es-deprecation-7-translog-retention",
202206
"translog retention settings [index.translog.retention.size] and [index.translog.retention.age] are ignored "
203207
+ "because translog is no longer used in peer recoveries with soft-deletes enabled (default in 7.0 or later)",
204208
false,
@@ -216,8 +220,7 @@ private DeprecationIssue checkIndexDataPath(IndexMetadata indexMetadata, Cluster
216220
"setting [%s] is deprecated and will be removed in a future version",
217221
IndexMetadata.INDEX_DATA_PATH_SETTING.getKey()
218222
);
219-
final String url = "https://www.elastic.co/guide/en/elasticsearch/reference/7.13/"
220-
+ "breaking-changes-7.13.html#deprecate-shared-data-path-setting";
223+
final String url = "https://ela.st/es-deprecation-7-index-data-path";
221224
final String details = "Found index data path configured. Discontinue use of this setting.";
222225
return new DeprecationIssue(DeprecationIssue.Level.WARNING, message, url, details, false, null);
223226
}
@@ -234,7 +237,7 @@ private DeprecationIssue storeTypeSettingCheck(
234237
return new DeprecationIssue(
235238
DeprecationIssue.Level.WARNING,
236239
"[simplefs] is deprecated and will be removed in future versions",
237-
"https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-store.html",
240+
"https://ela.st/es-deprecation-7-simplefs",
238241
"[simplefs] is deprecated and will be removed in 8.0. Use [niofs] or other file systems instead. "
239242
+ "Elasticsearch 7.15 or later uses [niofs] for the [simplefs] store type "
240243
+ "as it offers superior or equivalent performance to [simplefs].",

x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/MlDeprecationChecker.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static Optional<DeprecationIssue> checkDataFeedQuery(DatafeedConfig datafeedConf
3939
new DeprecationIssue(
4040
DeprecationIssue.Level.WARNING,
4141
"Datafeed [" + datafeedConfig.getId() + "] uses deprecated query options",
42-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html#breaking_70_search_changes",
42+
"https://ela.st/es-deprecation-7-data-feed-query",
4343
deprecations.toString(),
4444
false,
4545
null
@@ -57,8 +57,7 @@ static Optional<DeprecationIssue> checkDataFeedAggregations(DatafeedConfig dataf
5757
new DeprecationIssue(
5858
DeprecationIssue.Level.WARNING,
5959
"Datafeed [" + datafeedConfig.getId() + "] uses deprecated aggregation options",
60-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html"
61-
+ "#breaking_70_aggregations_changes",
60+
"https://ela.st/es-deprecation-7-data-feed-aggregation",
6261
deprecations.toString(),
6362
false,
6463
null
@@ -98,7 +97,7 @@ static Optional<DeprecationIssue> checkModelSnapshot(ModelSnapshot modelSnapshot
9897
modelSnapshot.getJobId(),
9998
modelSnapshot.getMinVersion()
10099
),
101-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/ml-upgrade-job-model-snapshot.html",
100+
"https://ela.st/es-deprecation-8-model-snapshot-version",
102101
details.toString(),
103102
false,
104103
Map.of("job_id", modelSnapshot.getJobId(), "snapshot_id", modelSnapshot.getSnapshotId())

x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecks.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,7 @@ static DeprecationIssue checkSharedDataPathSetting(
253253
"setting [%s] is deprecated and will be removed in a future version",
254254
Environment.PATH_SHARED_DATA_SETTING.getKey()
255255
);
256-
final String url = "https://www.elastic.co/guide/en/elasticsearch/reference/7.13/"
257-
+ "breaking-changes-7.13.html#deprecate-shared-data-path-setting";
256+
final String url = "https://ela.st/es-deprecation-7-shared-data-path";
258257
final String details = "Found shared data path configured. Discontinue use of this setting.";
259258
return new DeprecationIssue(DeprecationIssue.Level.WARNING, message, url, details, false, null);
260259
}
@@ -283,7 +282,7 @@ static DeprecationIssue checkReservedPrefixedRealmNames(
283282
return new DeprecationIssue(
284283
DeprecationIssue.Level.CRITICAL,
285284
"Realm that start with [" + RESERVED_REALM_AND_DOMAIN_NAME_PREFIX + "] will not be permitted in a future major release.",
286-
"https://www.elastic.co/guide/en/elasticsearch/reference/7.14/deprecated-7.14.html#reserved-prefixed-realm-names",
285+
"https://ela.st/es-deprecation-7-realm-prefix",
287286
String.format(
288287
Locale.ROOT,
289288
"Found realm "
@@ -996,7 +995,7 @@ static DeprecationIssue checkEqlEnabledSetting(
996995
Setting.Property.NodeScope,
997996
Setting.Property.DeprecatedWarning
998997
);
999-
String url = "https://ela.st/es-deprecation-8-eql-enabled-setting";
998+
String url = "https://ela.st/es-deprecation-7-eql-enabled-setting";
1000999
return checkRemovedSetting(
10011000
clusterState.metadata().settings(),
10021001
settings,
@@ -1043,7 +1042,7 @@ static DeprecationIssue checkWatcherBulkConcurrentRequestsSetting(
10431042
Setting.Property.NodeScope,
10441043
Setting.Property.Deprecated
10451044
);
1046-
String url = "https://ela.st/es-deprecation-8-watcher-bulk-concurrency-setting";
1045+
String url = "https://ela.st/es-deprecation-8-watcher-settings";
10471046
return checkRemovedSetting(
10481047
clusterState.metadata().settings(),
10491048
settings,

x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DataStreamDeprecationCheckerTests.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
package org.elasticsearch.xpack.deprecation;
99

10+
import org.elasticsearch.Version;
1011
import org.elasticsearch.cluster.ClusterName;
1112
import org.elasticsearch.cluster.ClusterState;
1213
import org.elasticsearch.cluster.metadata.DataStream;
@@ -56,9 +57,9 @@ public void testOldIndicesCheck() {
5657

5758
DeprecationIssue expected = new DeprecationIssue(
5859
DeprecationIssue.Level.CRITICAL,
59-
"Old data stream with a compatibility version < 8.0",
60-
"https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-8.0.html#breaking-changes-8.0",
61-
"This data stream has backing indices that were created before Elasticsearch 8.0.0",
60+
"Old data stream with a compatibility version < " + Version.CURRENT.major + ".0",
61+
"https://ela.st/es-deprecation-ds-reindex",
62+
"This data stream has backing indices that were created before Elasticsearch " + Version.CURRENT.major + ".0",
6263
false,
6364
ofEntries(
6465
entry("reindex_required", true),
@@ -125,9 +126,9 @@ public void testOldIndicesCheckWithClosedAndOpenIndices() {
125126

126127
DeprecationIssue expected = new DeprecationIssue(
127128
DeprecationIssue.Level.CRITICAL,
128-
"Old data stream with a compatibility version < 8.0",
129-
"https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-8.0.html#breaking-changes-8.0",
130-
"This data stream has backing indices that were created before Elasticsearch 8.0.0",
129+
"Old data stream with a compatibility version < " + Version.CURRENT.major + ".0",
130+
"https://ela.st/es-deprecation-ds-reindex",
131+
"This data stream has backing indices that were created before Elasticsearch " + Version.CURRENT.major + ".0",
131132
false,
132133
ofEntries(
133134
entry("reindex_required", true),
@@ -284,10 +285,11 @@ public void testOldIndicesIgnoredWarningCheck() {
284285

285286
DeprecationIssue expected = new DeprecationIssue(
286287
DeprecationIssue.Level.WARNING,
287-
"Old data stream with a compatibility version < 8.0 Have Been Ignored",
288-
"https://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-8.0.html#breaking-changes-8.0",
289-
"This data stream has read only backing indices that were created before Elasticsearch 8.0.0 and have been marked as "
290-
+ "OK to remain read-only after upgrade",
288+
"Old data stream with a compatibility version < " + Version.CURRENT.major + ".0 has Been Ignored",
289+
"https://ela.st/es-deprecation-ds-reindex",
290+
"This data stream has read only backing indices that were created before Elasticsearch "
291+
+ Version.CURRENT.major
292+
+ ".0 and have been marked as OK to remain read-only after upgrade",
291293
false,
292294
ofEntries(
293295
entry("reindex_required", false),

x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IlmPolicyDeprecationCheckerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public void testFrozenAction() {
140140
final DeprecationIssue expected = new DeprecationIssue(
141141
DeprecationIssue.Level.WARNING,
142142
"ILM policy [deprecated-action] contains the action 'freeze' that is deprecated and will be removed in a future version.",
143-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/frozen-indices.html",
143+
"https://ela.st/es-deprecation-7-frozen-index",
144144
"This action is already a noop so it can be safely removed, because frozen indices no longer offer any advantages."
145145
+ " Consider cold or frozen tiers in place of frozen indices.",
146146
false,

0 commit comments

Comments
 (0)