Skip to content

Commit a40f387

Browse files
authored
[8.18][ML] Update minimum supported snapshot version for Machine Learning jobs to 8.3.0 (#118166)
Change the minimum supported snapshot version for Machine Learning jobs to 8.3.0, ensuring compatibility with the latest snapshot format. Adjust related references throughout the codebase accordingly.
1 parent 8793efa commit a40f387

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

docs/changelog/118166.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 118166
2+
summary: Update minimum supported snapshot version for Machine Learning jobs to 8.3.0
3+
area: Machine Learning
4+
type: upgrade
5+
issues: []

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MachineLearningField.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ public final class MachineLearningField {
6767
License.OperationMode.PLATINUM
6868
);
6969

70-
// Ideally this would be 7.0.0, but it has to be 6.4.0 because due to an oversight it's impossible
70+
// Ideally this would be 8.3.0, but it has to be 6.4.0 because due to an oversight it's impossible
7171
// for the Java code to distinguish the model states for versions 6.4.0 to 7.9.3 inclusive.
7272
public static final MlConfigVersion MIN_CHECKED_SUPPORTED_SNAPSHOT_VERSION = MlConfigVersion.fromString("6.4.0");
73-
// We tell the user we support model snapshots newer than 7.0.0 as that's the major version
74-
// boundary, even though behind the scenes we have to support back to 6.4.0.
75-
public static final MlConfigVersion MIN_REPORTED_SUPPORTED_SNAPSHOT_VERSION = MlConfigVersion.V_7_0_0;
73+
// We tell the user we support model snapshots newer than 8.3.0 as that's the version with the last format change,
74+
// even though behind the scenes we have to support back to 6.4.0.
75+
public static final MlConfigVersion MIN_REPORTED_SUPPORTED_SNAPSHOT_VERSION = MlConfigVersion.V_8_3_0;
7676

7777
private MachineLearningField() {}
7878

x-pack/plugin/deprecation/qa/rest/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/MlDeprecationIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void testMlDeprecationChecks() throws Exception {
6363
indexDoc(
6464
".ml-anomalies-.write-" + jobId,
6565
jobId + "_model_snapshot_2",
66-
"{\"job_id\":\"deprecation_check_job\",\"snapshot_id\":\"2\",\"snapshot_doc_count\":1,\"min_version\":\"8.0.0\"}"
66+
"{\"job_id\":\"deprecation_check_job\",\"snapshot_id\":\"2\",\"snapshot_doc_count\":1,\"min_version\":\"8.3.0\"}"
6767
);
6868
client().performRequest(new Request("POST", "/.ml-anomalies-*/_refresh"));
6969

x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/AnomalyJobCRUDIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public void testOpenJobWithOldSnapshot() {
195195
assertThat(
196196
ex.getMessage(),
197197
containsString(
198-
"[open-job-with-old-model-snapshot] job model snapshot [snap_1] has min version before [7.0.0], "
198+
"[open-job-with-old-model-snapshot] job model snapshot [snap_1] has min version before [8.3.0], "
199199
+ "please revert to a newer model snapshot or reset the job"
200200
)
201201
);

0 commit comments

Comments
 (0)