Browse Source

[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.
Valeriy Khakhutskyy 10 tháng trước cách đây
mục cha
commit
a40f387e78

+ 5 - 0
docs/changelog/118166.yaml

@@ -0,0 +1,5 @@
+pr: 118166
+summary: Update minimum supported snapshot version for Machine Learning jobs to 8.3.0
+area: Machine Learning
+type: upgrade
+issues: []

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

@@ -67,12 +67,12 @@ public final class MachineLearningField {
         License.OperationMode.PLATINUM
     );
 
-    // Ideally this would be 7.0.0, but it has to be 6.4.0 because due to an oversight it's impossible
+    // Ideally this would be 8.3.0, but it has to be 6.4.0 because due to an oversight it's impossible
     // for the Java code to distinguish the model states for versions 6.4.0 to 7.9.3 inclusive.
     public static final MlConfigVersion MIN_CHECKED_SUPPORTED_SNAPSHOT_VERSION = MlConfigVersion.fromString("6.4.0");
-    // We tell the user we support model snapshots newer than 7.0.0 as that's the major version
-    // boundary, even though behind the scenes we have to support back to 6.4.0.
-    public static final MlConfigVersion MIN_REPORTED_SUPPORTED_SNAPSHOT_VERSION = MlConfigVersion.V_7_0_0;
+    // We tell the user we support model snapshots newer than 8.3.0 as that's the version with the last format change,
+    // even though behind the scenes we have to support back to 6.4.0.
+    public static final MlConfigVersion MIN_REPORTED_SUPPORTED_SNAPSHOT_VERSION = MlConfigVersion.V_8_3_0;
 
     private MachineLearningField() {}
 

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

@@ -63,7 +63,7 @@ public class MlDeprecationIT extends ESRestTestCase {
         indexDoc(
             ".ml-anomalies-.write-" + jobId,
             jobId + "_model_snapshot_2",
-            "{\"job_id\":\"deprecation_check_job\",\"snapshot_id\":\"2\",\"snapshot_doc_count\":1,\"min_version\":\"8.0.0\"}"
+            "{\"job_id\":\"deprecation_check_job\",\"snapshot_id\":\"2\",\"snapshot_doc_count\":1,\"min_version\":\"8.3.0\"}"
         );
         client().performRequest(new Request("POST", "/.ml-anomalies-*/_refresh"));
 

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

@@ -195,7 +195,7 @@ public class AnomalyJobCRUDIT extends MlSingleNodeTestCase {
         assertThat(
             ex.getMessage(),
             containsString(
-                "[open-job-with-old-model-snapshot] job model snapshot [snap_1] has min version before [7.0.0], "
+                "[open-job-with-old-model-snapshot] job model snapshot [snap_1] has min version before [8.3.0], "
                     + "please revert to a newer model snapshot or reset the job"
             )
         );