Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing integ tests due to missing opensearch-job-scheduler plugin and jayway lib #1147

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def knnJarDirectory = "$buildDir/dependencies/opensearch-knn"

dependencies {
api "org.opensearch:opensearch:${opensearch_version}"
zipArchive group: 'org.opensearch.plugin', name:'opensearch-job-scheduler', version: "${opensearch_build}"
yizheliu-amazon marked this conversation as resolved.
Show resolved Hide resolved
zipArchive group: 'org.opensearch.plugin', name:'opensearch-knn', version: "${opensearch_build}"
zipArchive group: 'org.opensearch.plugin', name:'opensearch-ml-plugin', version: "${opensearch_build}"
secureIntegTestPluginArchive group: 'org.opensearch.plugin', name:'opensearch-security', version: "${opensearch_build}"
Expand All @@ -268,6 +269,12 @@ dependencies {
runtimeOnly group: 'org.apache.commons', name: 'commons-text', version: '1.10.0'
runtimeOnly group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
runtimeOnly group: 'org.json', name: 'json', version: '20231013'
// json-path 2.9.0 depends on slf4j 2.0.11, which conflicts with the version used by OpenSearch core.
// Excluding slf4j here since json-path is only used for testing, and logging failures in this context are acceptable.
runtimeOnly('com.jayway.jsonpath:json-path:2.9.0') {
// OpenSearch core is using slf4j 1.7.36. Therefore, we cannot change the version here.
exclude group: 'org.slf4j', module: 'slf4j-api'
}
runtimeOnly("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}")
runtimeOnly("com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}")
testFixturesImplementation "org.opensearch:common-utils:${version}"
Expand Down
17 changes: 17 additions & 0 deletions qa/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,18 @@ def knnJarDirectory = "$rootDir/build/dependencies/opensearch-knn"

dependencies {
api "org.opensearch:opensearch:${opensearch_version}"
zipArchive group: 'org.opensearch.plugin', name:'opensearch-job-scheduler', version: "${opensearch_build}"
zipArchive group: 'org.opensearch.plugin', name:'opensearch-knn', version: "${opensearch_build}"
zipArchive group: 'org.opensearch.plugin', name:'opensearch-ml-plugin', version: "${opensearch_build}"
compileOnly fileTree(dir: knnJarDirectory, include: "opensearch-knn-${opensearch_build}.jar")
compileOnly group: 'com.google.guava', name: 'guava', version:'32.1.3-jre'
compileOnly group: 'commons-lang', name: 'commons-lang', version: '2.6'
// json-path 2.9.0 depends on slf4j 2.0.11, which conflicts with the version used by OpenSearch core.
// Excluding slf4j here since json-path is only used for testing, and logging failures in this context are acceptable.
testRuntimeOnly('com.jayway.jsonpath:json-path:2.9.0') {
// OpenSearch core is using slf4j 1.7.36. Therefore, we cannot change the version here.
exclude group: 'org.slf4j', module: 'slf4j-api'
}
api "org.apache.logging.log4j:log4j-api:${versions.log4j}"
api "org.apache.logging.log4j:log4j-core:${versions.log4j}"
api "junit:junit:${versions.junit}"
Expand Down Expand Up @@ -70,6 +77,16 @@ if (Os.isFamily(Os.FAMILY_WINDOWS)) {

ext{
plugins = [provider(new Callable<RegularFile>(){
@Override
RegularFile call() throws Exception {
return new RegularFile() {
@Override
File getAsFile() {
return configurations.zipArchive.asFileTree.matching{include "**/opensearch-job-scheduler-${opensearch_build}.zip"}.getSingleFile()
}
}
}
}), provider(new Callable<RegularFile>(){
@Override
RegularFile call() throws Exception {
return new RegularFile() {
Expand Down
Loading