diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 58b322ffd0..be045e0f95 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -10,10 +10,10 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Set up JDK 1.12 + - name: Set up JDK 1.13 uses: actions/setup-java@v1 with: - java-version: 1.12 + java-version: 1.13 - name: Build with Gradle run: ./gradlew build assemble diff --git a/build-tools/sqlplugin-coverage.gradle b/build-tools/sqlplugin-coverage.gradle index ed13b95d51..2d7f41ff94 100644 --- a/build-tools/sqlplugin-coverage.gradle +++ b/build-tools/sqlplugin-coverage.gradle @@ -12,10 +12,6 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ - -import javax.management.remote.JMXConnectorFactory -import javax.management.remote.JMXServiceURL - /** * ES Plugin build tools don't work with the Gradle Jacoco Plugin to report coverage out of the box. * https://github.com/elastic/elasticsearch/issues/28867. @@ -43,6 +39,7 @@ task dummyTest(type: Test) { } } +/* task dummyIntegTest(type: Test) { enabled = false workingDir = file("/") // Force absolute path to jacoco agent jar @@ -53,7 +50,7 @@ task dummyIntegTest(type: Test) { } } -integTestCluster { +integTest.runner { jvmArgs += " ${dummyIntegTest.jacoco.getAsJvmArg()}" systemProperty 'com.sun.management.jmxremote', "true" systemProperty 'com.sun.management.jmxremote.authenticate', "false" @@ -61,10 +58,11 @@ integTestCluster { systemProperty 'com.sun.management.jmxremote.ssl', "false" systemProperty 'java.rmi.server.hostname', "127.0.0.1" } +*/ jacocoTestReport { dependsOn integTest, test - executionData.from = [dummyTest.jacoco.destinationFile, dummyIntegTest.jacoco.destinationFile] + executionData.from = [dummyTest.jacoco.destinationFile/*, dummyIntegTest.jacoco.destinationFile*/] sourceDirectories.from = sourceSets.main.java.sourceDirectories classDirectories.from = files(sourceSets.main.java.outputDir) @@ -75,11 +73,12 @@ jacocoTestReport { } } +/* // See https://www.eclemma.org/jacoco/trunk/doc/api/org/jacoco/agent/rt/IAgent.html task dumpCoverage { onlyIf { // ignore the integ test coverage result when integTestRunner failed. - integTestRunner.getState().getFailure() == null + integTest.runner.getState().getFailure() == null } doFirst () { def serverUrl = "service:jmx:rmi:///jndi/rmi://127.0.0.1:7777/jmxrmi" @@ -95,7 +94,8 @@ task dumpCoverage { } project.gradle.projectsEvaluated { - integTestRunner.finalizedBy dumpCoverage - tasks['integTestCluster#stop'].dependsOn dumpCoverage + integTest.runner.finalizedBy dumpCoverage + tasks['integTest.runner#stop'].dependsOn dumpCoverage jacocoTestReport.dependsOn dumpCoverage -} \ No newline at end of file +} +*/ \ No newline at end of file diff --git a/build.gradle b/build.gradle index d3d4687172..6a10065047 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ buildscript { ext { // When upgrading to version after 7.3.0, must remove also // project substitution from configurations.all (line 39) - es_version = System.getProperty("es.version", "7.4.2") + es_version = System.getProperty("es.version", "7.6.1") } // This isn't applying from repositories.gradle so repeating it here repositories { @@ -31,10 +31,10 @@ buildscript { } plugins { - id 'nebula.ospackage' version "5.3.0" + id 'nebula.ospackage' version "8.1.0" id 'java-library' id 'checkstyle' - id "io.freefair.lombok" version "4.1.2" + id "io.freefair.lombok" version "5.0.0-rc4" } /* @@ -55,13 +55,14 @@ repositories { } ext { - opendistroVersion = '1.4.0' + opendistroVersion = '1.6.0' isSnapshot = "true" == System.getProperty("build.snapshot", "true") } version = "${opendistroVersion}.0" apply plugin: 'elasticsearch.esplugin' +apply plugin: 'elasticsearch.testclusters' apply plugin: 'jacoco' if (!System.properties.containsKey('tests.rest.cluster') && !System.properties.containsKey('tests.cluster')){ apply from: 'build-tools/sqlplugin-coverage.gradle' @@ -130,7 +131,11 @@ test { systemProperty('project.root', project.rootDir.absolutePath) } -integTestRunner { +testClusters.integTest { + testDistribution = 'oss' +} + +integTest.runner { // add "-Dtests.security.manager=false" to VM options if you want to run integ tests in IntelliJ systemProperty 'tests.security.manager', 'false' // allows integration test classes to access test resource from project root path @@ -138,7 +143,7 @@ integTestRunner { // Tell the test JVM if the cluster JVM is running under a debugger so that tests can use longer timeouts for // requests. The 'doFirst' delays reading the debug setting on the cluster till execution time. - doFirst { systemProperty 'cluster.debug', integTestCluster.debug } + // doFirst { systemProperty 'cluster.debug', integTestCluster.debug } // The --debug-jvm command-line option makes the cluster debuggable; this makes the tests debuggable if (System.getProperty("test.debug") != null) { @@ -173,15 +178,6 @@ integTestRunner { } } -integTestCluster { - // use elasticsearch oss distribution for integration test. - distribution = "oss-zip" -} - -run { - distribution = "oss-zip" -} - generateGrammarSource { arguments += ['-visitor', '-package', 'com.amazon.opendistroforelasticsearch.sql.antlr.parser'] source = sourceSets.main.antlr @@ -316,4 +312,3 @@ afterEvaluate { tasks = ['build', 'buildRpm', 'buildDeb'] } } - diff --git a/gradle.properties b/gradle.properties index 9d85fc2d47..8c02095997 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,4 +13,4 @@ # permissions and limitations under the License. # -version=1.4.0 +version=1.6.0 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3282a17bce..ef1cc2387c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -13,7 +13,7 @@ # permissions and limitations under the License. # -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.1-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists diff --git a/opendistro-elasticsearch-sql.release-notes.md b/opendistro-elasticsearch-sql.release-notes.md index c64ddac743..746b06642a 100644 --- a/opendistro-elasticsearch-sql.release-notes.md +++ b/opendistro-elasticsearch-sql.release-notes.md @@ -1,4 +1,29 @@ -## 2020-1-24, Version 1.4.0 (Current) +## 2020-03-17 Version 1.6.0.0 (Current) + +### Features +#### Elasticsearch Compatibility +* Feature [#376](https://github.com/opendistro-for-elasticsearch/sql/issues/376): Elasticsearch 7.6.1 compatibility + +#### Testing +* Feature [#374](https://github.com/opendistro-for-elasticsearch/sql/pull/374): Integration test with external ES cluster (issue: [353](https://github.com/opendistro-for-elasticsearch/sql/issues/353)) + +#### Documentation +* Feature [#366](https://github.com/opendistro-for-elasticsearch/sql/pull/366): Documentation for simple query (issue: [#363](https://github.com/opendistro-for-elasticsearch/sql/issues/363)) +* Feature [#379](https://github.com/opendistro-for-elasticsearch/sql/pull/379): Documentation for Pagination (issue: [#16](https://github.com/opendistro-for-elasticsearch/sql/issues/16)) + +### Enhancements +#### SQL Features +* Enhancement [#367](https://github.com/opendistro-for-elasticsearch/sql/pull/367): Report date data as a standardized format (issue: [#342](https://github.com/opendistro-for-elasticsearch/sql/issues/342)) + +#### Exception Handling +* Enhancement [#362](https://github.com/opendistro-for-elasticsearch/sql/pull/362): Handle the elasticsearch exceptions in JDBC formatted outputs(issues: [#320](https://github.com/opendistro-for-elasticsearch/sql/issues/320), [308](https://github.com/opendistro-for-elasticsearch/sql/issues/308)) +* Enhancement [#372](https://github.com/opendistro-for-elasticsearch/sql/pull/372): Modified the wording of exception messages and created the troubleshooting page(issue: [#320](https://github.com/opendistro-for-elasticsearch/sql/issues/320)) + +### Bugfixes +* BugFix [#365](https://github.com/opendistro-for-elasticsearch/sql/pull/365): Return Correct Type Information for Fields (issue: [#316](https://github.com/opendistro-for-elasticsearch/sql/issues/316)) +* BugFix [#377](https://github.com/opendistro-for-elasticsearch/sql/pull/377): Return object type for field which has implicit object datatype when describe the table (issue:[sql-jdbc#57](https://github.com/opendistro-for-elasticsearch/sql-jdbc/issues/57)) + +## 2020-01-24, Version 1.4.0 ### Features #### Elasticsearch Compatibility diff --git a/src/test/resources/expectedOutput/search_spatial_explain.json b/src/test/resources/expectedOutput/search_spatial_explain.json index 8717faa819..7040ce1776 100644 --- a/src/test/resources/expectedOutput/search_spatial_explain.json +++ b/src/test/resources/expectedOutput/search_spatial_explain.json @@ -11,7 +11,7 @@ "geo_shape" : { "place" : { "shape" : { - "type" : "polygon", + "type" : "Polygon", "coordinates" : [ [ [