From 88823b3c53aa379c8b47304fe73080547ebbc201 Mon Sep 17 00:00:00 2001 From: Varun Jain Date: Wed, 27 Dec 2023 13:42:10 -0800 Subject: [PATCH] Addressing comments of Naveen Signed-off-by: Varun Jain --- qa/build.gradle | 2 +- qa/restart-upgrade/build.gradle | 5 ++++- qa/rolling-upgrade/build.gradle | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/qa/build.gradle b/qa/build.gradle index ccaba4e24..0ce535ea0 100644 --- a/qa/build.gradle +++ b/qa/build.gradle @@ -145,8 +145,8 @@ task zipBwcMlCommonsPlugin(type: Zip) { // Task to zip knn plugin from archive task zipBwcKnnPlugin(type: Zip) { - dependsOn "zipBwcMlCommonsPlugin" dependsOn "pullKnnBwcPlugin" + dependsOn "zipBwcMlCommonsPlugin" from(java.nio.file.Path.of(tmp_dir.absolutePath, "opensearch-knn")) destinationDirectory = tmp_dir archiveFileName = "opensearch-knn-${neural_search_bwc_version_no_qualifier}.zip" diff --git a/qa/restart-upgrade/build.gradle b/qa/restart-upgrade/build.gradle index c7bd6ae74..d585e388d 100644 --- a/qa/restart-upgrade/build.gradle +++ b/qa/restart-upgrade/build.gradle @@ -13,6 +13,7 @@ String default_bwc_version = System.getProperty("bwc.version") String neural_search_bwc_version = System.getProperty("tests.bwc.version", default_bwc_version) boolean isSnapshot = neural_search_bwc_version.contains("-SNAPSHOT") String baseName = "neuralSearchBwcCluster-restart" +String knn_bwc_version_no_qualifier = isSnapshot ? neural_search_bwc_version - "-SNAPSHOT" : neural_search_bwc_version List> plugins = [provider(new Callable(){ @Override @@ -36,7 +37,7 @@ List> plugins = [provider(new Callable(){ } }), rootProject.tasks.bundlePlugin.archiveFile] -// Creates a test cluster of previous version and loads neuralsearch plugin of bwcVersion +// Creates a test cluster of previous version and loads k-NN plugin of bwcVersion testClusters { "${baseName}" { testDistribution = "ARCHIVE" @@ -48,6 +49,8 @@ testClusters { plugin(project.tasks.zipBwcPlugin.archiveFile) setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}" setting 'http.content_type.required', 'true' + environment "LD_LIBRARY_PATH", "${buildDir}/testclusters/${baseName}-0/distro/${knn_bwc_version_no_qualifier}-ARCHIVE/plugins/opensearch-knn/knnlib;${buildDir}/testclusters/${baseName}-0/distro/${knn_bwc_version_no_qualifier}-ARCHIVE/plugins/opensearch-knn/lib" + systemProperty "java.library.path", "${buildDir}/testclusters/${baseName}-0/distro/${knn_bwc_version_no_qualifier}-ARCHIVE/plugins/opensearch-knn/knnlib:${buildDir}/testclusters/${baseName}-0/distro/${knn_bwc_version_no_qualifier}-ARCHIVE/plugins/opensearch-knn/lib" } } diff --git a/qa/rolling-upgrade/build.gradle b/qa/rolling-upgrade/build.gradle index e7f959dc5..f2dbb80f8 100644 --- a/qa/rolling-upgrade/build.gradle +++ b/qa/rolling-upgrade/build.gradle @@ -13,6 +13,7 @@ apply from : "$rootDir/qa/build.gradle" String default_bwc_version = System.getProperty("bwc.version") String neural_search_bwc_version = System.getProperty("tests.bwc.version", default_bwc_version) boolean isSnapshot = neural_search_bwc_version.contains("-SNAPSHOT") +String knn_bwc_version_no_qualifier = isSnapshot ? neural_search_bwc_version - "-SNAPSHOT" : neural_search_bwc_version String baseName = "neuralSearchBwcCluster-rolling" List> plugins = [provider(new Callable(){ @@ -49,6 +50,8 @@ testClusters { jvmArgs("-Xms1g", "-Xmx4g") setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}" setting 'http.content_type.required', 'true' + environment "LD_LIBRARY_PATH", "${buildDir}/testclusters/${baseName}-0/distro/${knn_bwc_version_no_qualifier}-ARCHIVE/plugins/opensearch-knn/knnlib;${buildDir}/testclusters/${baseName}-0/distro/${knn_bwc_version_no_qualifier}-ARCHIVE/plugins/opensearch-knn/lib" + systemProperty "java.library.path", "${buildDir}/testclusters/${baseName}-0/distro/${knn_bwc_version_no_qualifier}-ARCHIVE/plugins/opensearch-knn/knnlib:${buildDir}/testclusters/${baseName}-0/distro/${knn_bwc_version_no_qualifier}-ARCHIVE/plugins/opensearch-knn/lib" } }