From ecc2512b874f5cf8b399af953913363de9fc6ef6 Mon Sep 17 00:00:00 2001
From: David Kyle <david.kyle@elastic.co>
Date: Wed, 17 May 2023 11:55:41 +0100
Subject: [PATCH] Renable upgrade tests after pipeline parsing fix

---
 .../upgrades/MLModelDeploymentsUpgradeIT.java  | 18 ++++--------------
 .../upgrades/MlTrainedModelsUpgradeIT.java     | 14 ++------------
 2 files changed, 6 insertions(+), 26 deletions(-)

diff --git a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MLModelDeploymentsUpgradeIT.java b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MLModelDeploymentsUpgradeIT.java
index 702e24782d9e5..c1ff7c4f618b0 100644
--- a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MLModelDeploymentsUpgradeIT.java
+++ b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MLModelDeploymentsUpgradeIT.java
@@ -113,20 +113,10 @@ public void testTrainedModelDeployment() throws Exception {
                     request.addParameter("timeout", "70s");
                 }));
 
-                // 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);
-                    }
+                waitForDeploymentStarted(modelId);
+                // attempt inference on new and old nodes multiple times
+                for (int i = 0; i < 10; i++) {
+                    assertInfer(modelId);
                 }
             }
             case UPGRADED -> {
diff --git a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MlTrainedModelsUpgradeIT.java b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MlTrainedModelsUpgradeIT.java
index 7742b3fe28286..d05989c056a49 100644
--- a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MlTrainedModelsUpgradeIT.java
+++ b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MlTrainedModelsUpgradeIT.java
@@ -75,18 +75,8 @@ public void testTrainedModelInference() throws Exception {
                 }));
                 List<String> modelIds = getTrainedModels();
 
-                // 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();
-                }
+                // Test that stats are serializable and can be gathered
+                getTrainedModelStats();
                 // Verify that the pipelines still work and inference is possible
                 testInfer(modelIds);
             }