Skip to content

Commit a4f8c2d

Browse files
committed
check old cluster version
1 parent c04f2b8 commit a4f8c2d

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,20 @@
2020
import java.util.Map;
2121
import java.util.stream.Collectors;
2222

23+
import static org.elasticsearch.xpack.application.HuggingFaceServiceUpgradeIT.HF_EMBEDDINGS_ADDED;
2324
import static org.elasticsearch.xpack.application.HuggingFaceServiceUpgradeIT.elserConfig;
2425
import static org.elasticsearch.xpack.application.HuggingFaceServiceUpgradeIT.elserResponse;
2526
import static org.elasticsearch.xpack.application.HuggingFaceServiceUpgradeIT.embeddingConfig;
2627
import static org.hamcrest.Matchers.equalTo;
2728
import static org.hamcrest.Matchers.greaterThan;
2829

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

@@ -50,6 +57,9 @@ public ModelRegistryUpgradeIT(@Name("upgradedNodes") int upgradedNodes) {
5057
}
5158

5259
public void testUpgradeModels() throws Exception {
60+
boolean oldClusterSupportsHF = oldClusterHasFeature("gte_v" + MIN_OLD_CLUSTER_VERSION);
61+
assumeTrue("Test requires features added in " + MIN_OLD_CLUSTER_VERSION, oldClusterSupportsHF);
62+
5363
if (isOldCluster()) {
5464
int numModels = randomIntBetween(5, 10);
5565
for (int i = 0; i < numModels; i++) {

0 commit comments

Comments
 (0)