Skip to content

[8.0] [ML] Switch message and detail for model snapshot deprecations (#81108) #81114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void testMlDeprecationChecks() throws Exception {
assertThat(response.getMlSettingsIssues(), hasSize(1));
assertThat(
response.getMlSettingsIssues().get(0).getMessage(),
containsString("Delete model snapshot [1] or update it to 7.0.0 or greater")
containsString("Model snapshot [1] for job [deprecation_check_job] has an obsolete minimum version")
);
assertThat(response.getMlSettingsIssues().get(0).getMeta(), equalTo(Map.of("job_id", jobId, "snapshot_id", "1")));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,9 @@ static Optional<DeprecationIssue> checkModelSnapshot(ModelSnapshot modelSnapshot
StringBuilder details = new StringBuilder(
String.format(
Locale.ROOT,
// Important: the Kibana upgrade assistant expects this to match the pattern /[Mm]odel snapshot/
// and if it doesn't then the expected "Fix" button won't appear for this deprecation.
"Model snapshot [%s] for job [%s] has an obsolete minimum version [%s].",
"Delete model snapshot [%s] or update it to %s or greater.",
modelSnapshot.getSnapshotId(),
modelSnapshot.getJobId(),
modelSnapshot.getMinVersion()
MIN_REPORTED_SUPPORTED_SNAPSHOT_VERSION
)
);
if (modelSnapshot.getLatestRecordTimeStamp() != null) {
Expand All @@ -95,9 +92,12 @@ static Optional<DeprecationIssue> checkModelSnapshot(ModelSnapshot modelSnapshot
DeprecationIssue.Level.CRITICAL,
String.format(
Locale.ROOT,
"Delete model snapshot [%s] or update it to %s or greater.",
// Important: the Kibana upgrade assistant expects this to match the pattern /[Mm]odel snapshot/
// and if it doesn't then the expected "Fix" button won't appear for this deprecation.
"Model snapshot [%s] for job [%s] has an obsolete minimum version [%s].",
modelSnapshot.getSnapshotId(),
MIN_REPORTED_SUPPORTED_SNAPSHOT_VERSION
modelSnapshot.getJobId(),
modelSnapshot.getMinVersion()
),
"https://www.elastic.co/guide/en/elasticsearch/reference/master/ml-upgrade-job-model-snapshot.html",
details.toString(),
Expand Down