Skip to content
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

[8.8] [ML] Re-enable upgrade tests with workaround for invalid pipeline config (#95778) #95783

Merged
merged 1 commit into from
May 3, 2023
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 @@ -96,7 +96,6 @@ public void removeLogging() throws IOException {
client().performRequest(request);
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/95360")
public void testTrainedModelDeployment() throws Exception {
assumeTrue("NLP model deployments added in 8.0", UPGRADE_FROM_VERSION.onOrAfter(Version.V_8_0_0));

Expand All @@ -112,10 +111,21 @@ public void testTrainedModelDeployment() throws Exception {
request.addParameter("wait_for_status", "yellow");
request.addParameter("timeout", "70s");
}));
waitForDeploymentStarted(modelId);
// attempt inference on new and old nodes multiple times
for (int i = 0; i < 10; i++) {
assertInfer(modelId);

// Workaround for an upgrade test failure where an ingest
// pipeline config cannot be parsed by older nodes:
// https://github.com/elastic/elasticsearch/issues/95766
//
// In version 8.3.1 ml stopped parsing the full ingest
// pipeline configuration so will avoid this problem.
// TODO remove this check once https://github.com/elastic/elasticsearch/issues/95766
// is resolved
if (UPGRADE_FROM_VERSION.onOrAfter(Version.V_8_3_1)) {
waitForDeploymentStarted(modelId);
// attempt inference on new and old nodes multiple times
for (int i = 0; i < 10; i++) {
assertInfer(modelId);
}
}
}
case UPGRADED -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ protected Collection<String> templatesToWaitFor() {
.collect(Collectors.toSet());
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/95360")
public void testTrainedModelInference() throws Exception {
assumeTrue("We should only test if old cluster is after trained models we GA", UPGRADE_FROM_VERSION.after(Version.V_7_13_0));
switch (CLUSTER_TYPE) {
Expand All @@ -75,8 +74,19 @@ public void testTrainedModelInference() throws Exception {
request.addParameter("timeout", "70s");
}));
List<String> modelIds = getTrainedModels();
// Test that stats are serializable and can be gathered
getTrainedModelStats();

// Workaround for an upgrade test failure where an ingest
// pipeline config cannot be parsed by older nodes:
// https://github.com/elastic/elasticsearch/issues/95766
//
// In version 8.3.1 ml stopped parsing the full ingest
// pipeline configuration so will avoid this problem.
// TODO remove this check once https://github.com/elastic/elasticsearch/issues/95766
// is resolved
if (UPGRADE_FROM_VERSION.onOrAfter(Version.V_8_3_1)) {
// Test that stats are serializable and can be gathered
getTrainedModelStats();
}
// Verify that the pipelines still work and inference is possible
testInfer(modelIds);
}
Expand Down