diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0a4c757..1f9e3235 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,10 +30,10 @@ jobs: - name: Checkout Branch uses: actions/checkout@v2 - name: Build with Gradle - run: ./gradlew build -Dopensearch.version=2.0.0-SNAPSHOT + run: ./gradlew build -Dopensearch.version=2.0.0-alpha1-SNAPSHOT - name: Pull and Run Docker for security tests run: | - version=2.0.0-SNAPSHOT + version=2.0.0-alpha1-SNAPSHOT plugin_version=2.0.0.0-SNAPSHOT pwd=`pwd` echo $pwd @@ -108,7 +108,7 @@ jobs: - name: Checkout Branch uses: actions/checkout@v2 - name: Build with Gradle - run: ./gradlew.bat build -D"opensearch.version=2.0.0-SNAPSHOT" -x integTest -x jacocoTestReport + run: ./gradlew.bat build -D"opensearch.version=2.0.0-alpha1-SNAPSHOT" -x integTest -x jacocoTestReport env: _JAVA_OPTIONS: -Xmx4096M - name: Create Artifact Path @@ -136,7 +136,7 @@ jobs: - name: Checkout Branch uses: actions/checkout@v2 - name: Build with Gradle - run: ./gradlew build -Dopensearch.version=2.0.0-SNAPSHOT -x integTest -x jacocoTestReport + run: ./gradlew build -Dopensearch.version=2.0.0-alpha1-SNAPSHOT -x integTest -x jacocoTestReport env: _JAVA_OPTIONS: -Xmx4096M - name: Create Artifact Path diff --git a/.github/workflows/multi-node-test-workflow.yml b/.github/workflows/multi-node-test-workflow.yml index 5910fcfa..797c6f2a 100644 --- a/.github/workflows/multi-node-test-workflow.yml +++ b/.github/workflows/multi-node-test-workflow.yml @@ -27,7 +27,7 @@ jobs: - name: Checkout Branch uses: actions/checkout@v2 - name: Run integration tests with multi node config - run: ./gradlew integTest -PnumNodes=5 -Dopensearch.version=2.0.0-SNAPSHOT + run: ./gradlew integTest -PnumNodes=5 -Dopensearch.version=2.0.0-alpha1-SNAPSHOT - name: Run Backwards Compatibility Tests run: | echo "Running backwards compatibility tests ..." diff --git a/src/main/java/org/opensearch/search/asynchronous/service/AsynchronousSearchPersistenceService.java b/src/main/java/org/opensearch/search/asynchronous/service/AsynchronousSearchPersistenceService.java index 5590b33b..60f55e02 100644 --- a/src/main/java/org/opensearch/search/asynchronous/service/AsynchronousSearchPersistenceService.java +++ b/src/main/java/org/opensearch/search/asynchronous/service/AsynchronousSearchPersistenceService.java @@ -392,7 +392,7 @@ private Settings indexSettings() { private XContentBuilder mapping() { try { XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON); - builder + builder.startObject() .startObject("properties") .startObject(START_TIME_MILLIS) .field("type", "date") @@ -408,6 +408,7 @@ private XContentBuilder mapping() { .startObject(ERROR) .field("type", "binary") .endObject() + .endObject() .endObject(); return builder; } catch (IOException e) { diff --git a/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchQueryIT.java b/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchQueryIT.java index d840260b..79928b23 100644 --- a/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchQueryIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchQueryIT.java @@ -184,7 +184,7 @@ public void testAggregationQuery() throws InterruptedException, ExecutionExcepti public void testIpRangeQuery() throws InterruptedException { assertAcked(prepareCreate("idx") - .setMapping("type", "ip", "type=ip", "ips", "type=ip")); + .setMapping("ip", "type=ip", "ips", "type=ip")); waitForRelocation(ClusterHealthStatus.GREEN); indexRandom(true, diff --git a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchPartialResponseIT.java b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchPartialResponseIT.java index 44f4f6c1..aa91b909 100644 --- a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchPartialResponseIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchPartialResponseIT.java @@ -63,7 +63,7 @@ protected int numberOfShards() { protected void createIdx(String keyFieldMapping) { assertAcked(prepareCreate("idx") - .setMapping("type", "key", keyFieldMapping)); + .setMapping("key", keyFieldMapping)); } protected void indexData() throws Exception { diff --git a/src/test/java/org/opensearch/search/asynchronous/management/AsynchronousSearchManagementServiceIT.java b/src/test/java/org/opensearch/search/asynchronous/management/AsynchronousSearchManagementServiceIT.java index 768468d6..d8c34b63 100644 --- a/src/test/java/org/opensearch/search/asynchronous/management/AsynchronousSearchManagementServiceIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/management/AsynchronousSearchManagementServiceIT.java @@ -124,7 +124,7 @@ public void testCleansUpExpiredAsynchronousSearchDuringFetchPhase() throws Excep public void testDeletesExpiredAsynchronousSearchResponseFromPersistedStore() throws Exception { String idx = "idx"; assertAcked(prepareCreate(idx) - .setMapping("type", "ip", "type=ip", "ips", "type=ip")); + .setMapping("ip", "type=ip", "ips", "type=ip")); waitForRelocation(ClusterHealthStatus.GREEN); indexRandom(true, client().prepareIndex(idx).setId("1").setSource( diff --git a/src/test/java/org/opensearch/search/asynchronous/request/AsynchronousSearchRequestRoutingIT.java b/src/test/java/org/opensearch/search/asynchronous/request/AsynchronousSearchRequestRoutingIT.java index d16b126b..7c152d0f 100644 --- a/src/test/java/org/opensearch/search/asynchronous/request/AsynchronousSearchRequestRoutingIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/request/AsynchronousSearchRequestRoutingIT.java @@ -48,7 +48,7 @@ protected int maximumNumberOfReplicas() { public void testRequestForwardingToCoordinatorNodeForPersistedAsynchronousSearch() throws Exception { String idx = "idx"; assertAcked(prepareCreate(idx) - .setMapping("type", "ip", "type=ip", "ips", "type=ip")); + .setMapping("ip", "type=ip", "ips", "type=ip")); waitForRelocation(ClusterHealthStatus.GREEN); indexRandom(true, client().prepareIndex(idx).setId("1").setSource( @@ -98,7 +98,7 @@ public void testRequestForwardingToCoordinatorNodeForRunningAsynchronousSearch() List plugins = initBlockFactory(); String index = "idx"; assertAcked(prepareCreate(index) - .setMapping("type", "ip", "type=ip", "ips", "type=ip")); + .setMapping("ip", "type=ip", "ips", "type=ip")); waitForRelocation(ClusterHealthStatus.GREEN); indexRandom(true,