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

[1.3] Add Bwc Test for OS 1.1 (#417) #423

Merged
merged 3 commits into from
Aug 17, 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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions reports-scheduler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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<RegularFile>(){
@Override
Expand All @@ -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 }}
}
Expand All @@ -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 }}
}
Expand Down Expand Up @@ -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 }}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 -> {
Expand Down
Binary file not shown.
Binary file not shown.