Skip to content

Commit 1fa2d0c

Browse files
authored
[8.x][ML] Report deprecation for outdated snapshots (#118939)
This PR fixes the constant used to produce deprecated warnings in the Upgrade Assistant in 8.18. It ensures that for all ML model snapshots produced prior to version 8.3 the user can either delete or update them. I marked it as a non-issue since it fixes the logic updated in #118166 and has not been released yet.
1 parent 72f8530 commit 1fa2d0c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import java.util.Map;
2727
import java.util.Optional;
2828

29-
import static org.elasticsearch.xpack.core.ml.MachineLearningField.MIN_CHECKED_SUPPORTED_SNAPSHOT_VERSION;
3029
import static org.elasticsearch.xpack.core.ml.MachineLearningField.MIN_REPORTED_SUPPORTED_SNAPSHOT_VERSION;
3130

3231
public class MlDeprecationChecker implements DeprecationChecker {
@@ -69,7 +68,7 @@ static Optional<DeprecationIssue> checkDataFeedAggregations(DatafeedConfig dataf
6968
}
7069

7170
static Optional<DeprecationIssue> checkModelSnapshot(ModelSnapshot modelSnapshot) {
72-
if (modelSnapshot.getMinVersion().before(MIN_CHECKED_SUPPORTED_SNAPSHOT_VERSION)) {
71+
if (modelSnapshot.getMinVersion().before(MIN_REPORTED_SUPPORTED_SNAPSHOT_VERSION)) {
7372
StringBuilder details = new StringBuilder(
7473
String.format(
7574
Locale.ROOT,

0 commit comments

Comments
 (0)