From a4f8c2ddec34219deff1c07c1b40abebbc566b3c Mon Sep 17 00:00:00 2001 From: David Kyle Date: Fri, 4 Jul 2025 12:24:18 +0100 Subject: [PATCH 1/3] check old cluster version --- muted-tests.yml | 6 ------ .../xpack/application/ModelRegistryUpgradeIT.java | 10 ++++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index dcc011eb218ee..e79ded9587fe2 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -411,12 +411,6 @@ tests: - class: org.elasticsearch.repositories.blobstore.testkit.analyze.GCSRepositoryAnalysisRestIT method: testRepositoryAnalysis issue: https://github.com/elastic/elasticsearch/issues/125668 - - class: org.elasticsearch.xpack.application.ModelRegistryUpgradeIT - method: testUpgradeModels {upgradedNodes=0} - issue: https://github.com/elastic/elasticsearch/issues/125549 - - class: org.elasticsearch.xpack.application.ModelRegistryUpgradeIT - method: testUpgradeModels {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/125535 - class: org.elasticsearch.ingest.geoip.EnterpriseGeoIpDownloaderIT method: testEnterpriseDownloaderTask issue: https://github.com/elastic/elasticsearch/issues/126124 diff --git a/x-pack/plugin/inference/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/application/ModelRegistryUpgradeIT.java b/x-pack/plugin/inference/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/application/ModelRegistryUpgradeIT.java index 6d019057d068d..98d5fe7ce63e2 100644 --- a/x-pack/plugin/inference/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/application/ModelRegistryUpgradeIT.java +++ b/x-pack/plugin/inference/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/application/ModelRegistryUpgradeIT.java @@ -20,6 +20,7 @@ import java.util.Map; import java.util.stream.Collectors; +import static org.elasticsearch.xpack.application.HuggingFaceServiceUpgradeIT.HF_EMBEDDINGS_ADDED; import static org.elasticsearch.xpack.application.HuggingFaceServiceUpgradeIT.elserConfig; import static org.elasticsearch.xpack.application.HuggingFaceServiceUpgradeIT.elserResponse; import static org.elasticsearch.xpack.application.HuggingFaceServiceUpgradeIT.embeddingConfig; @@ -27,6 +28,12 @@ import static org.hamcrest.Matchers.greaterThan; public class ModelRegistryUpgradeIT extends InferenceUpgradeTestCase { + + // Hugging Face embeddings and ELSER was added in 8.12.0 + // but in 8.15 the endpoints were renamed. For the sake of this + // test can can start at 8.15.0. + public static final String MIN_OLD_CLUSTER_VERSION = "8.15.0"; + private static MockWebServer embeddingsServer; private static MockWebServer elserServer; @@ -50,6 +57,9 @@ public ModelRegistryUpgradeIT(@Name("upgradedNodes") int upgradedNodes) { } public void testUpgradeModels() throws Exception { + boolean oldClusterSupportsHF = oldClusterHasFeature("gte_v" + MIN_OLD_CLUSTER_VERSION); + assumeTrue("Test requires features added in " + MIN_OLD_CLUSTER_VERSION, oldClusterSupportsHF); + if (isOldCluster()) { int numModels = randomIntBetween(5, 10); for (int i = 0; i < numModels; i++) { From 19cfb25b1e59976a50765dc5855463044dd44961 Mon Sep 17 00:00:00 2001 From: elasticsearchmachine Date: Fri, 4 Jul 2025 11:37:27 +0000 Subject: [PATCH 2/3] [CI] Auto commit changes from spotless --- .../elasticsearch/xpack/application/ModelRegistryUpgradeIT.java | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/plugin/inference/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/application/ModelRegistryUpgradeIT.java b/x-pack/plugin/inference/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/application/ModelRegistryUpgradeIT.java index 98d5fe7ce63e2..89e8d3b467d53 100644 --- a/x-pack/plugin/inference/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/application/ModelRegistryUpgradeIT.java +++ b/x-pack/plugin/inference/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/application/ModelRegistryUpgradeIT.java @@ -20,7 +20,6 @@ import java.util.Map; import java.util.stream.Collectors; -import static org.elasticsearch.xpack.application.HuggingFaceServiceUpgradeIT.HF_EMBEDDINGS_ADDED; import static org.elasticsearch.xpack.application.HuggingFaceServiceUpgradeIT.elserConfig; import static org.elasticsearch.xpack.application.HuggingFaceServiceUpgradeIT.elserResponse; import static org.elasticsearch.xpack.application.HuggingFaceServiceUpgradeIT.embeddingConfig; From 506a910a8dd2018c73ecf070bd16dfb2f892929a Mon Sep 17 00:00:00 2001 From: David Kyle Date: Fri, 4 Jul 2025 13:19:31 +0100 Subject: [PATCH 3/3] Update x-pack/plugin/inference/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/application/ModelRegistryUpgradeIT.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Przemysław Witek --- .../elasticsearch/xpack/application/ModelRegistryUpgradeIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugin/inference/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/application/ModelRegistryUpgradeIT.java b/x-pack/plugin/inference/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/application/ModelRegistryUpgradeIT.java index 89e8d3b467d53..55e720e9af9d4 100644 --- a/x-pack/plugin/inference/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/application/ModelRegistryUpgradeIT.java +++ b/x-pack/plugin/inference/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/application/ModelRegistryUpgradeIT.java @@ -30,7 +30,7 @@ public class ModelRegistryUpgradeIT extends InferenceUpgradeTestCase { // Hugging Face embeddings and ELSER was added in 8.12.0 // but in 8.15 the endpoints were renamed. For the sake of this - // test can can start at 8.15.0. + // test can start at 8.15.0. public static final String MIN_OLD_CLUSTER_VERSION = "8.15.0"; private static MockWebServer embeddingsServer;