diff --git a/.github/workflows/reports-scheduler-test-and-build-workflow.yml b/.github/workflows/reports-scheduler-test-and-build-workflow.yml index 1403182d..9271ef78 100644 --- a/.github/workflows/reports-scheduler-test-and-build-workflow.yml +++ b/.github/workflows/reports-scheduler-test-and-build-workflow.yml @@ -25,6 +25,12 @@ jobs: - name: Checkout Reports Scheduler uses: actions/checkout@v2 + - name: RunBackwards Compatibility Tests + run: | + cd reports-scheduler + echo "Running backwards compatibility tests ..." + ./gradlew bwcTestSuite + - name: Build with Gradle run: | cd reports-scheduler diff --git a/reports-scheduler/build.gradle b/reports-scheduler/build.gradle index 10567cde..f81652de 100644 --- a/reports-scheduler/build.gradle +++ b/reports-scheduler/build.gradle @@ -240,7 +240,7 @@ Zip bundle = (Zip) project.getTasks().getByName("bundlePlugin"); integTest.dependsOn(bundle) integTest.getClusters().forEach{c -> c.plugin(project.getObjects().fileProperty().value(bundle.getArchiveFile()))} -String jobSchedulerURL = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/" + opensearch_version.replace("-SNAPSHOT", "") + "/latest/linux/x64/builds/opensearch/plugins/opensearch-job-scheduler-" + opensearch_build.replace("-SNAPSHOT", "") + ".zip" +String jobSchedulerURL = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/" + opensearch_version.replace("-SNAPSHOT", "") + "/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-job-scheduler-" + opensearch_build.replace("-SNAPSHOT", "") + ".zip" testClusters.integTest { testDistribution = "INTEG_TEST" @@ -280,18 +280,18 @@ testClusters.integTest { setting 'path.repo', repo.absolutePath } -// For job-scheduler and reports-scheduler, the latest opendistro releases appear to be 1.13.0.0. -String bwcVersion = "1.13.0.0" +// For job-scheduler and reports-scheduler, the latest opensearch releases appear to be 1.1.0.0. +String bwcVersion = "1.1.0.0" String baseName = "reportsSchedulerBwcCluster" String bwcFilePath = "src/test/resources/bwc" -String bwcJobSchedulerURL = "https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-job-scheduler/opendistro-job-scheduler-" + bwcVersion + ".zip" -String bwcReportsSchedulerURL = "https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-reports-scheduler/opendistro-reports-scheduler-" + bwcVersion + ".zip" +String bwcJobSchedulerURL = "https://ci.opensearch.org/ci/dbc/bundle-build/1.1.0/20210930/linux/x64/builds/opensearch/plugins/opensearch-job-scheduler-1.1.0.0.zip" +String bwcReportsSchedulerURL = "https://ci.opensearch.org/ci/dbc/bundle-build/1.1.0/20210930/linux/x64/builds/opensearch/plugins/opensearch-reports-scheduler-1.1.0.0.zip" 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(){ @Override @@ -303,7 +303,7 @@ String bwcReportsSchedulerURL = "https://d3g5vo6xdbdb9a.cloudfront.net/downloads if (!dir.exists()) { dir.mkdirs() } - File file = new File(dir, "opendistro-job-scheduler-" + bwcVersion + ".zip") + File file = new File(dir, "opensearch-job-scheduler-" + bwcVersion + ".zip") if (!file.exists()) { new URL(bwcJobSchedulerURL).withInputStream{ ins -> file.withOutputStream{ it << ins }} } @@ -322,7 +322,7 @@ String bwcReportsSchedulerURL = "https://d3g5vo6xdbdb9a.cloudfront.net/downloads if (!dir.exists()) { dir.mkdirs() } - File file = new File(dir, "opendistro-reports-scheduler-" + bwcVersion + ".zip") + File file = new File(dir, "opensearch-reports-scheduler-" + bwcVersion + ".zip") if (!file.exists()) { new URL(bwcReportsSchedulerURL).withInputStream{ ins -> file.withOutputStream{ it << ins }} } @@ -354,7 +354,7 @@ task prepareBwcTests { if (!dir.exists()) { dir.mkdirs() } - File file = new File(dir, "opendistro-reports-scheduler-" + project.version + ".zip") + File file = new File(dir, "opensearch-reports-scheduler-" + project.version + ".zip") if (!file.exists()) { new URL(jobSchedulerURL).withInputStream{ ins -> file.withOutputStream{ it << ins }} } diff --git a/reports-scheduler/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt b/reports-scheduler/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt index c37a396f..78605ff6 100644 --- a/reports-scheduler/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt +++ b/reports-scheduler/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt @@ -50,8 +50,8 @@ class ReportsSchedulerBackwardsCompatibilityIT : PluginRestTestCase() { val pluginNames = plugins.map { plugin -> plugin["name"] }.toSet() when (CLUSTER_TYPE) { ClusterType.OLD -> { - assertTrue(pluginNames.contains("opendistro-reports-scheduler")) - assertTrue(pluginNames.contains("opendistro-job-scheduler")) + assertTrue(pluginNames.contains("opensearch-reports-scheduler")) + assertTrue(pluginNames.contains("opensearch-job-scheduler")) createBasicReportDefinition() } ClusterType.MIXED -> { diff --git a/reports-scheduler/src/test/resources/bwc/job-scheduler/1.3.5.0-SNAPSHOT/opensearch-job-scheduler-1.3.5.0-SNAPSHOT.zip b/reports-scheduler/src/test/resources/bwc/job-scheduler/1.3.5.0-SNAPSHOT/opensearch-job-scheduler-1.3.5.0-SNAPSHOT.zip deleted file mode 100644 index c79941b1..00000000 Binary files a/reports-scheduler/src/test/resources/bwc/job-scheduler/1.3.5.0-SNAPSHOT/opensearch-job-scheduler-1.3.5.0-SNAPSHOT.zip and /dev/null differ diff --git a/reports-scheduler/src/test/resources/job-scheduler/opensearch-job-scheduler-1.3.5.0-SNAPSHOT.zip b/reports-scheduler/src/test/resources/job-scheduler/opensearch-job-scheduler-1.3.5.0-SNAPSHOT.zip deleted file mode 100644 index c79941b1..00000000 Binary files a/reports-scheduler/src/test/resources/job-scheduler/opensearch-job-scheduler-1.3.5.0-SNAPSHOT.zip and /dev/null differ