Skip to content

Commit

Permalink
temp for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhniebergall committed May 10, 2024
1 parent 5fda71b commit fca46fd
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 82 deletions.
87 changes: 39 additions & 48 deletions build-tools-internal/version.properties
Original file line number Diff line number Diff line change
@@ -1,60 +1,51 @@
elasticsearch = 8.15.0
lucene = 9.10.0

bundled_jdk_vendor = openjdk
bundled_jdk = 21.0.2+13@f2283984656d49d69e91c558476027ac
elasticsearch=8.16.0
lucene=9.10.0
bundled_jdk_vendor=openjdk
bundled_jdk=21.0.2+13@f2283984656d49d69e91c558476027ac
# optional dependencies
spatial4j = 0.7
jts = 1.15.0
jackson = 2.15.0
snakeyaml = 2.0
icu4j = 68.2
supercsv = 2.4.0
log4j = 2.19.0
slf4j = 2.0.6
ecsLogging = 1.2.0
jna = 5.12.1
netty = 4.1.109.Final
commons_lang3 = 3.9
google_oauth_client = 1.34.1

antlr4 = 4.13.1
spatial4j=0.7
jts=1.15.0
jackson=2.15.0
snakeyaml=2.0
icu4j=68.2
supercsv=2.4.0
log4j=2.19.0
slf4j=2.0.6
ecsLogging=1.2.0
jna=5.12.1
netty=4.1.109.Final
commons_lang3=3.9
google_oauth_client=1.34.1
antlr4=4.13.1
# bouncy castle version for non-fips. fips jars use a different version
bouncycastle=1.78.1
# used by security and idp (need to be in sync due to cross-dependency in testing)
opensaml = 4.3.0

opensaml=4.3.0
# client dependencies
httpclient = 4.5.14
httpcore = 4.4.13
httpasyncclient = 4.1.5
commonslogging = 1.2
commonscodec = 1.15
protobuf = 3.21.9

httpclient=4.5.14
httpcore=4.4.13
httpasyncclient=4.1.5
commonslogging=1.2
commonscodec=1.15
protobuf=3.21.9
# test dependencies
randomizedrunner = 2.8.0
junit = 4.13.2
junit5 = 5.7.1
hamcrest = 2.1
mocksocket = 1.2

randomizedrunner=2.8.0
junit=4.13.2
junit5=5.7.1
hamcrest=2.1
mocksocket=1.2
# test container dependencies
testcontainer = 1.19.2
dockerJava = 3.3.4
ductTape = 1.0.8
commonsCompress = 1.24.0

testcontainer=1.19.2
dockerJava=3.3.4
ductTape=1.0.8
commonsCompress=1.24.0
# packer caching build logic
reflections = 0.10.2

reflections=0.10.2
# benchmark dependencies
jmh = 1.26

jmh=1.26
# test dependencies
# when updating this version, also update :qa:evil-tests
jimfs = 1.3.0
jimfs_guava = 32.1.1-jre

jimfs=1.3.0
jimfs_guava=32.1.1-jre
# test framework
networknt_json_schema_validator = 1.0.48
networknt_json_schema_validator=1.0.48
3 changes: 2 additions & 1 deletion server/src/main/java/org/elasticsearch/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ public class Version implements VersionId<Version>, ToXContentFragment {
public static final Version V_8_13_4 = new Version(8_13_04_99);
public static final Version V_8_14_0 = new Version(8_14_00_99);
public static final Version V_8_15_0 = new Version(8_15_00_99);
public static final Version CURRENT = V_8_15_0;
public static final Version V_8_16_0 = new Version(8_16_00_99);
public static final Version CURRENT = V_8_16_0;

private static final NavigableMap<Integer, Version> VERSION_IDS;
private static final Map<String, Version> VERSION_STRINGS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,15 @@
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.inference.TaskType;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.http.MockWebServer;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.hamcrest.Matchers;
import org.junit.ClassRule;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public abstract class BaseMixedIT extends ESRestTestCase {
@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.distribution(DistributionType.DEFAULT)
.setting("xpack.license.self_generated.type", "trial")
.setting("xpack.security.enabled", "true")
.plugin("inference-service-test")
.user("x_pack_rest_user", "x-pack-test-password")
.build();

@Override
protected String getTestRestCluster() {
return cluster.getHttpAddresses();
}

public abstract class BaseMixedTestCase extends MixedClusterSpecTestCase {
protected static String getUrl(MockWebServer webServer) {
return Strings.format("http://%s:%s", webServer.getHostName(), webServer.getPort());
}
Expand Down Expand Up @@ -123,8 +106,9 @@ protected void put(String inferenceId, String modelConfig, TaskType taskType) th
var request = new Request("PUT", endpoint);
request.setJsonEntity(modelConfig);
var response = ESRestTestCase.client().performRequest(request);
ESRestTestCase.assertOKAndConsume(response);
logger.warn("PUT response: {}", response.toString());
System.out.println("PUT response: " + response.toString());
ESRestTestCase.assertOKAndConsume(response);
}

protected static void assertOkOrCreated(Response response) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
import java.util.List;
import java.util.Map;

import static org.elasticsearch.xpack.inference.qa.mixed.MixedClusterSpecIT.bwcVersion;
import static org.elasticsearch.xpack.inference.qa.mixed.MixedClusterSpecTestCase.bwcVersion;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.hasEntry;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.oneOf;

public class CohereServiceMixedIT extends BaseMixedIT {
public class CohereServiceMixedIT extends BaseMixedTestCase {

private static final String COHERE_EMBEDDINGS_ADDED = "8.13.0";
private static final String COHERE_RERANK_ADDED = "8.14.0";
Expand Down Expand Up @@ -63,6 +63,7 @@ public void testCohereEmbeddings() throws IOException {
// queue a response as PUT will call the service
cohereEmbeddingsServer.enqueue(new MockResponse().setResponseCode(200).setBody(embeddingResponseByte()));
put(inferenceIdInt8, embeddingConfigInt8(getUrl(cohereEmbeddingsServer)), TaskType.TEXT_EMBEDDING);

// float model
cohereEmbeddingsServer.enqueue(new MockResponse().setResponseCode(200).setBody(embeddingResponseFloat()));
put(inferenceIdFloat, embeddingConfigFloat(getUrl(cohereEmbeddingsServer)), TaskType.TEXT_EMBEDDING);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
import java.util.List;
import java.util.Map;

import static org.elasticsearch.xpack.inference.qa.mixed.MixedClusterSpecIT.bwcVersion;
import static org.hamcrest.Matchers.*;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.not;

public class HuggingFaceServiceMixedIT extends BaseMixedIT {
public class HuggingFaceServiceMixedIT extends BaseMixedTestCase {

private static final String HF_EMBEDDINGS_ADDED = "8.12.0";
private static final String HF_ELSER_ADDED = "8.12.0";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
import org.elasticsearch.Version;
import org.elasticsearch.features.NodeFeature;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.TestFeatureService;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.ClassRule;

public class MixedClusterSpecIT extends BaseMixedIT {
public abstract class MixedClusterSpecTestCase extends ESRestTestCase {
@ClassRule
public static ElasticsearchCluster cluster = Clusters.mixedVersionCluster();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
import java.util.List;
import java.util.Map;

import static org.elasticsearch.xpack.inference.qa.mixed.MixedClusterSpecIT.bwcVersion;
import static org.elasticsearch.xpack.inference.qa.mixed.MixedClusterSpecTestCase.bwcVersion;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.hasEntry;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.not;

public class OpenAIServiceMixedIT extends BaseMixedIT {
public class OpenAIServiceMixedIT extends BaseMixedTestCase {

private static final String OPEN_AI_EMBEDDINGS_ADDED = "8.12.0";
private static final String OPEN_AI_EMBEDDINGS_MODEL_SETTING_MOVED = "8.13.0";
Expand Down
12 changes: 6 additions & 6 deletions x-pack/plugin/ml/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ esplugin.bundleSpec.from {
esplugin.bundleSpec.exclude 'platform/licenses/**'

["bundlePlugin", "explodedBundlePlugin"].each { bundleTaskName ->
tasks.named(bundleTaskName).configure {
dependsOn configurations.nativeBundle
}
tasks.named(bundleTaskName).configure {
dependsOn configurations.nativeBundle
}
}

dependencies {
Expand Down Expand Up @@ -100,10 +100,10 @@ dependencies {
api "org.apache.lucene:lucene-analysis-icu:${versions.lucene}"
api "org.apache.lucene:lucene-analysis-kuromoji:${versions.lucene}"
implementation 'org.ojalgo:ojalgo:51.2.0'
nativeBundle("org.elasticsearch.ml:ml-cpp:${project.version}:deps@zip") {
nativeBundle("org.elasticsearch.ml:ml-cpp:8.15.0-SNAPSHOT:deps@zip") {
changing = true
}
nativeBundle("org.elasticsearch.ml:ml-cpp:${project.version}:nodeps@zip") {
nativeBundle("org.elasticsearch.ml:ml-cpp:8.15.0-SNAPSHOT:nodeps@zip") {
changing = true
}
testImplementation 'org.ini4j:ini4j:0.5.2'
Expand Down Expand Up @@ -136,7 +136,7 @@ tasks.named('generateNotice').configure {
inputs.dir("${project.buildDir}/extractedNativeLicenses/platform/licenses")
.withPropertyName('licensingDir')
.withPathSensitivity(PathSensitivity.RELATIVE)
licenseDirs.add(tasks.named("extractNativeLicenses").map {new File(it.destinationDir, "platform/licenses") })
licenseDirs.add(tasks.named("extractNativeLicenses").map { new File(it.destinationDir, "platform/licenses") })
}

tasks.named("dependencyLicenses").configure {
Expand Down

0 comments on commit fca46fd

Please sign in to comment.