From d4fd14d51050ddc06b7f80989d98e66fe5d0dc5a Mon Sep 17 00:00:00 2001 From: Vacha Date: Mon, 16 Aug 2021 08:29:18 -0700 Subject: [PATCH] Bumping anomaly-detection to 1.1.0.0 to use OpenSearch (main) 1.1.0 (#175) --- .github/workflows/CI.yml | 22 +++++++++---------- build.gradle | 10 ++++----- src/main/java/org/opensearch/ad/util/Bwc.java | 3 +-- .../transport/CronTransportActionTests.java | 1 + 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d733b8396..eed342510 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 diff --git a/build.gradle b/build.gradle index ad262a6fd..c35c3e35d 100644 --- a/build.gradle +++ b/build.gradle @@ -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"] numberOfNodes = 3 plugin(provider(new Callable(){ @Override diff --git a/src/main/java/org/opensearch/ad/util/Bwc.java b/src/main/java/org/opensearch/ad/util/Bwc.java index 9bfd02ffb..6f921b0e2 100644 --- a/src/main/java/org/opensearch/ad/util/Bwc.java +++ b/src/main/java/org/opensearch/ad/util/Bwc.java @@ -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); } } diff --git a/src/test/java/org/opensearch/ad/transport/CronTransportActionTests.java b/src/test/java/org/opensearch/ad/transport/CronTransportActionTests.java index 4b93a12ae..e6a81e188 100644 --- a/src/test/java/org/opensearch/ad/transport/CronTransportActionTests.java +++ b/src/test/java/org/opensearch/ad/transport/CronTransportActionTests.java @@ -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);