Skip to content

Commit

Permalink
[8.x][ML] Report deprecation for outdated snapshots (elastic#118939)
Browse files Browse the repository at this point in the history
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 elastic#118166 and has not been released yet.
  • Loading branch information
valeriy42 authored Dec 19, 2024
1 parent 72f8530 commit 1fa2d0c
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.util.Map;
import java.util.Optional;

import static org.elasticsearch.xpack.core.ml.MachineLearningField.MIN_CHECKED_SUPPORTED_SNAPSHOT_VERSION;
import static org.elasticsearch.xpack.core.ml.MachineLearningField.MIN_REPORTED_SUPPORTED_SNAPSHOT_VERSION;

public class MlDeprecationChecker implements DeprecationChecker {
Expand Down Expand Up @@ -69,7 +68,7 @@ static Optional<DeprecationIssue> checkDataFeedAggregations(DatafeedConfig dataf
}

static Optional<DeprecationIssue> checkModelSnapshot(ModelSnapshot modelSnapshot) {
if (modelSnapshot.getMinVersion().before(MIN_CHECKED_SUPPORTED_SNAPSHOT_VERSION)) {
if (modelSnapshot.getMinVersion().before(MIN_REPORTED_SUPPORTED_SNAPSHOT_VERSION)) {
StringBuilder details = new StringBuilder(
String.format(
Locale.ROOT,
Expand Down

0 comments on commit 1fa2d0c

Please sign in to comment.