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

Bumping anomaly-detection to 1.1.0.0 to use OpenSearch (main) 1.1.0 #175

Merged
merged 2 commits into from
Aug 16, 2021
Merged
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
22 changes: 11 additions & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -33,37 +33,37 @@ jobs:
with:
repository: 'opensearch-project/OpenSearch'
path: OpenSearch
ref: '1.0'
ref: 'main'
- name: Build OpenSearch
working-directory: ./OpenSearch
run: ./gradlew publishToMavenLocal -Dbuild.snapshot=false
run: ./gradlew publishToMavenLocal

# dependencies: common-utils
- name: Checkout common-utils
uses: actions/checkout@v2
with:
ref: '1.0'
ref: 'main'
repository: 'opensearch-project/common-utils'
path: common-utils
- name: Build common-utils
working-directory: ./common-utils
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT

# dependencies: job-scheduler
- name: Checkout job-scheduler
uses: actions/checkout@v2
with:
ref: '1.0'
ref: 'main'
repository: 'opensearch-project/job-scheduler'
path: job-scheduler

- name: Build job-scheduler
working-directory: ./job-scheduler
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0 -Dbuild.snapshot=false
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT -Dbuild.snapshot=false
- name: Assemble job-scheduler
working-directory: ./job-scheduler
run: |
./gradlew assemble -Dopensearch.version=1.0.0 -Dbuild.snapshot=false
./gradlew assemble -Dopensearch.version=1.1.0-SNAPSHOT -Dbuild.snapshot=false
echo "Creating ../src/test/resources/job-scheduler ..."
mkdir -p ../src/test/resources/job-scheduler
pwd
@@ -75,11 +75,11 @@ jobs:

- name: Build and Run Tests
run: |
./gradlew build -Dopensearch.version=1.0.0
./gradlew build -Dopensearch.version=1.1.0-SNAPSHOT

- name: Publish to Maven Local
run: |
./gradlew publishToMavenLocal -Dopensearch.version=1.0.0
./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT

- name: Multi Nodes Integration Testing
run: |
@@ -91,8 +91,8 @@ jobs:
## version=`echo $plugin|awk -F- '{print $4}'| cut -d. -f 1-3`
## plugin_version=`echo $plugin|awk -F- '{print $4}'| cut -d. -f 1-4`
## TODO: remove these two hard code versions below after GA release
version=1.0.0
plugin_version=1.0.0.0
version=1.1.0-SNAPSHOT
plugin_version=1.1.0.0
echo $version
cd ..
if docker pull opensearchstaging/opensearch:$version
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -31,9 +31,9 @@ import org.opensearch.gradle.testclusters.StandaloneRestIntegTestTask
buildscript {
ext {
opensearch_group = "org.opensearch"
opensearch_version = System.getProperty("opensearch.version", "1.0.0")
common_utils_version = System.getProperty("common_utils.version", "1.0.0.0")
job_scheduler_version = System.getProperty("job_scheduler.version", "1.0.0.0")
opensearch_version = System.getProperty("opensearch.version", "1.1.0-SNAPSHOT")
common_utils_version = System.getProperty("common_utils.version", "1.1.0.0")
job_scheduler_version = System.getProperty("job_scheduler.version", "1.1.0.0")
}

repositories {
@@ -63,7 +63,7 @@ repositories {
}

ext {
opensearchVersion = System.getProperty("opensearch.version", "1.0.0")
opensearchVersion = System.getProperty("opensearch.version", "1.1.0")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
}

@@ -274,7 +274,7 @@ String bwcFilePath = "src/test/resources/org/opensearch/ad/bwc/"
testClusters {
"${baseName}" {
testDistribution = "ARCHIVE"
versions = ["7.10.2","1.0.0"]
versions = ["7.10.2","1.1.0-SNAPSHOT"]
Copy link
Collaborator

@ylwu-amzn ylwu-amzn Aug 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also test upgrade with last version OS 1.0?
BTW, the CI workflow failed as "Could not find org.opensearch.gradle:build-tools:1.1.0."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ylwu-amzn, the corresponding bwc tests are added so that the core framework for bwc for plugins is ready to use and they are an example of how the bwc tests can be added in the plugins. Each plugin owners can now take up the tests and enhance them to include multiple versions and test required functionalities.

For the CI failure, I am working on fixing that since AD is consuming the snapshot build while job-scheduler and common-utils are not, I am making corresponding changes in the respective repos.

numberOfNodes = 3
plugin(provider(new Callable<RegularFile>(){
@Override
3 changes: 1 addition & 2 deletions src/main/java/org/opensearch/ad/util/Bwc.java
Original file line number Diff line number Diff line change
@@ -27,7 +27,6 @@ public class Bwc {
* @return whether the version support multiple category fields
*/
public static boolean supportMultiCategoryFields(Version version) {
// TODO: remove DISABLE_BWC before 1.1 release
return DISABLE_BWC || version.after(Version.V_1_0_0);
return version.after(Version.V_1_0_0);
}
}
Original file line number Diff line number Diff line change
@@ -118,6 +118,7 @@ public void testNormal() throws IOException, JsonPathNotFoundException {
nodeRequestOut.setVersion(Version.V_1_0_0);
nodeRequest.writeTo(nodeRequestOut);
StreamInput siNode = nodeRequestOut.bytes().streamInput();
siNode.setVersion(Version.V_1_0_0);

CronNodeRequest nodeResponseRead = new CronNodeRequest(siNode);