Skip to content

Commit b2da02d

Browse files
lukewhitinggmaroulielasticsearchmachine
authored
Update Documentation URLs (#125089) (#127165)
* 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)
1 parent df0f79d commit b2da02d

File tree

9 files changed

+99
-87
lines changed

9 files changed

+99
-87
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 < 9.0",
97-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-9.0.html",
98-
"This data stream has backing indices that were created before Elasticsearch 9.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 < 9.0 Have Been Ignored",
119-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-9.0.html",
120-
"This data stream has read only backing indices that were created before Elasticsearch 9.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: 19 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;
@@ -100,14 +101,14 @@ private DeprecationIssue oldIndicesCheck(
100101
if (transforms.isEmpty() == false) {
101102
return new DeprecationIssue(
102103
DeprecationIssue.Level.CRITICAL,
103-
"One or more Transforms write to this index with a compatibility version < 9.0",
104-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html"
105-
+ "#breaking_90_transform_destination_index",
104+
"One or more Transforms write to this index with a compatibility version < " + Version.CURRENT.major + ".0",
105+
"https://ela.st/es-deprecation-9-transform-destination-index",
106106
Strings.format(
107-
"This index was created in version [%s] and requires action before upgrading to 9.0. The following transforms are "
107+
"This index was created in version [%s] and requires action before upgrading to %d.0. The following transforms are "
108108
+ "configured to write to this index: [%s]. Refer to the migration guide to learn more about how to prepare "
109109
+ "transforms destination indices for your upgrade.",
110110
currentCompatibilityVersion.toReleaseVersion(),
111+
Version.CURRENT.major,
111112
String.join(", ", transforms)
112113
),
113114
false,
@@ -116,8 +117,8 @@ private DeprecationIssue oldIndicesCheck(
116117
} else {
117118
return new DeprecationIssue(
118119
DeprecationIssue.Level.CRITICAL,
119-
"Old index with a compatibility version < 9.0",
120-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html",
120+
"Old index with a compatibility version < " + Version.CURRENT.major + ".0",
121+
"https://ela.st/es-deprecation-9-index-version",
121122
"This index has version: " + currentCompatibilityVersion.toReleaseVersion(),
122123
false,
123124
Map.of("reindex_required", true)
@@ -143,14 +144,14 @@ private DeprecationIssue ignoredOldIndicesCheck(
143144
if (transforms.isEmpty() == false) {
144145
return new DeprecationIssue(
145146
DeprecationIssue.Level.WARNING,
146-
"One or more Transforms write to this old index with a compatibility version < 9.0",
147-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html"
148-
+ "#breaking_90_transform_destination_index",
147+
"One or more Transforms write to this old index with a compatibility version < " + Version.CURRENT.major + ".0",
148+
"https://ela.st/es-deprecation-9-transform-destination-index",
149149
Strings.format(
150-
"This index was created in version [%s] and will be supported as a read-only index in 9.0. The following "
150+
"This index was created in version [%s] and will be supported as a read-only index in %d.0. The following "
151151
+ "transforms are no longer able to write to this index: [%s]. Refer to the migration guide to learn more "
152152
+ "about how to handle your transforms destination indices.",
153153
currentCompatibilityVersion.toReleaseVersion(),
154+
Version.CURRENT.major,
154155
String.join(", ", transforms)
155156
),
156157
false,
@@ -159,11 +160,13 @@ private DeprecationIssue ignoredOldIndicesCheck(
159160
} else {
160161
return new DeprecationIssue(
161162
DeprecationIssue.Level.WARNING,
162-
"Old index with a compatibility version < 9.0 has been ignored",
163-
"https://www.elastic.co/guide/en/elastic-stack/9.0/upgrading-elastic-stack.html",
163+
"Old index with a compatibility version < " + Version.CURRENT.major + ".0 has been ignored",
164+
"https://ela.st/es-deprecation-9-index-version",
164165
"This read-only index has version: "
165166
+ currentCompatibilityVersion.toReleaseVersion()
166-
+ " and will be supported as read-only in 9.0",
167+
+ " and will be supported as read-only in "
168+
+ Version.CURRENT.major
169+
+ ".0",
167170
false,
168171
Map.of("reindex_required", true)
169172
);
@@ -196,7 +199,7 @@ private DeprecationIssue translogRetentionSettingCheck(
196199
return new DeprecationIssue(
197200
DeprecationIssue.Level.WARNING,
198201
"translog retention settings are ignored",
199-
"https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-translog.html",
202+
"https://ela.st/es-deprecation-7-translog-retention",
200203
"translog retention settings [index.translog.retention.size] and [index.translog.retention.age] are ignored "
201204
+ "because translog is no longer used in peer recoveries with soft-deletes enabled (default in 7.0 or later)",
202205
false,
@@ -214,8 +217,7 @@ private DeprecationIssue checkIndexDataPath(IndexMetadata indexMetadata, Cluster
214217
"setting [%s] is deprecated and will be removed in a future version",
215218
IndexMetadata.INDEX_DATA_PATH_SETTING.getKey()
216219
);
217-
final String url = "https://www.elastic.co/guide/en/elasticsearch/reference/7.13/"
218-
+ "breaking-changes-7.13.html#deprecate-shared-data-path-setting";
220+
final String url = "https://ela.st/es-deprecation-7-index-data-path";
219221
final String details = "Found index data path configured. Discontinue use of this setting.";
220222
return new DeprecationIssue(DeprecationIssue.Level.WARNING, message, url, details, false, null);
221223
}
@@ -232,7 +234,7 @@ private DeprecationIssue storeTypeSettingCheck(
232234
return new DeprecationIssue(
233235
DeprecationIssue.Level.WARNING,
234236
"[simplefs] is deprecated and will be removed in future versions",
235-
"https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-store.html",
237+
"https://ela.st/es-deprecation-7-simplefs",
236238
"[simplefs] is deprecated and will be removed in 8.0. Use [niofs] or other file systems instead. "
237239
+ "Elasticsearch 7.15 or later uses [niofs] for the [simplefs] store type "
238240
+ "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
@@ -251,8 +251,7 @@ static DeprecationIssue checkSharedDataPathSetting(
251251
"setting [%s] is deprecated and will be removed in a future version",
252252
Environment.PATH_SHARED_DATA_SETTING.getKey()
253253
);
254-
final String url = "https://www.elastic.co/guide/en/elasticsearch/reference/7.13/"
255-
+ "breaking-changes-7.13.html#deprecate-shared-data-path-setting";
254+
final String url = "https://ela.st/es-deprecation-7-shared-data-path";
256255
final String details = "Found shared data path configured. Discontinue use of this setting.";
257256
return new DeprecationIssue(DeprecationIssue.Level.WARNING, message, url, details, false, null);
258257
}
@@ -281,7 +280,7 @@ static DeprecationIssue checkReservedPrefixedRealmNames(
281280
return new DeprecationIssue(
282281
DeprecationIssue.Level.CRITICAL,
283282
"Realm that start with [" + RESERVED_REALM_AND_DOMAIN_NAME_PREFIX + "] will not be permitted in a future major release.",
284-
"https://www.elastic.co/guide/en/elasticsearch/reference/7.14/deprecated-7.14.html#reserved-prefixed-realm-names",
283+
"https://ela.st/es-deprecation-7-realm-prefix",
285284
String.format(
286285
Locale.ROOT,
287286
"Found realm "
@@ -972,7 +971,7 @@ static DeprecationIssue checkEqlEnabledSetting(
972971
Setting.Property.NodeScope,
973972
Setting.Property.DeprecatedWarning
974973
);
975-
String url = "https://ela.st/es-deprecation-8-eql-enabled-setting";
974+
String url = "https://ela.st/es-deprecation-7-eql-enabled-setting";
976975
return checkRemovedSetting(
977976
clusterState.metadata().settings(),
978977
settings,
@@ -1019,7 +1018,7 @@ static DeprecationIssue checkWatcherBulkConcurrentRequestsSetting(
10191018
Setting.Property.NodeScope,
10201019
Setting.Property.Deprecated
10211020
);
1022-
String url = "https://ela.st/es-deprecation-8-watcher-bulk-concurrency-setting";
1021+
String url = "https://ela.st/es-deprecation-8-watcher-settings";
10231022
return checkRemovedSetting(
10241023
clusterState.metadata().settings(),
10251024
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 < 9.0",
60-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-9.0.html",
61-
"This data stream has backing indices that were created before Elasticsearch 9.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 < 9.0",
129-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-9.0.html",
130-
"This data stream has backing indices that were created before Elasticsearch 9.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 < 9.0 Have Been Ignored",
288-
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-9.0.html",
289-
"This data stream has read only backing indices that were created before Elasticsearch 9.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)