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

Enable BWC tests with with OpenSearch 1.1 #772

Merged
merged 1 commit into from
Aug 18, 2022
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
3 changes: 3 additions & 0 deletions .github/workflows/sql-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
- name: Build with Gradle
run: ./gradlew build assemble

- name: Run backward compatibility tests
run: ./scripts/bwctest.sh

- name: Create Artifact Path
run: |
mkdir -p opensearch-sql-builds
Expand Down
14 changes: 5 additions & 9 deletions integ-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -187,21 +187,17 @@ task compileJdbc(type: Exec) {
}
}

/*
BWC test suite was running on OpenDistro which was discontinued and no available anymore for testing.
Test suite is not removed, because it could be reused later between different OpenSearch versions.
*/
String bwcVersion = "1.13.2.0";
String bwcVersion = "1.1.0.0";
String baseName = "sqlBwcCluster"
String bwcFilePath = "src/test/resources/bwc/"
String bwcOpenDistroPlugin = "opendistro-sql-" + bwcVersion + ".zip"
String bwcRemoteFile = 'https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-sql/' + bwcOpenDistroPlugin
String bwcSqlPlugin = "opensearch-sql-" + bwcVersion + ".zip"
String bwcRemoteFile = "https://ci.opensearch.org/ci/dbc/bundle-build/1.1.0/20210930/linux/x64/builds/opensearch/plugins/" + bwcSqlPlugin

2.times { i ->
testClusters {
"${baseName}$i" {
testDistribution = "ARCHIVE"
versions = ["7.10.2", opensearch_version]
versions = ["1.1.0", opensearch_version]
numberOfNodes = 3
plugin(provider(new Callable<RegularFile>() {
@Override
Expand All @@ -213,7 +209,7 @@ String bwcRemoteFile = 'https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elastics
if (!dir.exists()) {
dir.mkdirs()
}
File f = new File(dir, bwcOpenDistroPlugin)
File f = new File(dir, bwcSqlPlugin)
if (!f.exists()) {
new URL(bwcRemoteFile).withInputStream{ ins -> f.withOutputStream{ it << ins }}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void testBackwardsCompatibility() throws Exception {
Set<Object> pluginNames = plugins.stream().map(map -> map.get("name")).collect(Collectors.toSet());
switch (CLUSTER_TYPE) {
case OLD:
Assert.assertTrue(pluginNames.contains("opendistro-sql"));
Assert.assertTrue(pluginNames.contains("opensearch-sql"));
updateLegacySQLSettings();
loadIndex(Index.ACCOUNT);
verifySQLQueries(LEGACY_QUERY_API_ENDPOINT);
Expand Down
2 changes: 2 additions & 0 deletions integ-test/src/test/resources/bwc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
Empty file modified scripts/bwctest.sh
100644 → 100755
Empty file.