Skip to content

Commit b9fb1b9

Browse files
authored
[ML] Check old cluster version in ModelRegistry upgrade tests (#130625)
1 parent 77f9848 commit b9fb1b9

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,12 +411,6 @@ tests:
411411
- class: org.elasticsearch.repositories.blobstore.testkit.analyze.GCSRepositoryAnalysisRestIT
412412
method: testRepositoryAnalysis
413413
issue: https://github.com/elastic/elasticsearch/issues/125668
414-
- class: org.elasticsearch.xpack.application.ModelRegistryUpgradeIT
415-
method: testUpgradeModels {upgradedNodes=0}
416-
issue: https://github.com/elastic/elasticsearch/issues/125549
417-
- class: org.elasticsearch.xpack.application.ModelRegistryUpgradeIT
418-
method: testUpgradeModels {upgradedNodes=3}
419-
issue: https://github.com/elastic/elasticsearch/issues/125535
420414
- class: org.elasticsearch.ingest.geoip.EnterpriseGeoIpDownloaderIT
421415
method: testEnterpriseDownloaderTask
422416
issue: https://github.com/elastic/elasticsearch/issues/126124

x-pack/plugin/inference/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/application/ModelRegistryUpgradeIT.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
import static org.hamcrest.Matchers.greaterThan;
2828

2929
public class ModelRegistryUpgradeIT extends InferenceUpgradeTestCase {
30+
31+
// Hugging Face embeddings and ELSER was added in 8.12.0
32+
// but in 8.15 the endpoints were renamed. For the sake of this
33+
// test can start at 8.15.0.
34+
public static final String MIN_OLD_CLUSTER_VERSION = "8.15.0";
35+
3036
private static MockWebServer embeddingsServer;
3137
private static MockWebServer elserServer;
3238

@@ -50,6 +56,9 @@ public ModelRegistryUpgradeIT(@Name("upgradedNodes") int upgradedNodes) {
5056
}
5157

5258
public void testUpgradeModels() throws Exception {
59+
boolean oldClusterSupportsHF = oldClusterHasFeature("gte_v" + MIN_OLD_CLUSTER_VERSION);
60+
assumeTrue("Test requires features added in " + MIN_OLD_CLUSTER_VERSION, oldClusterSupportsHF);
61+
5362
if (isOldCluster()) {
5463
int numModels = randomIntBetween(5, 10);
5564
for (int i = 0; i < numModels; i++) {

0 commit comments

Comments
 (0)