From 435857ccebd9f10c0282b05acf8869917d4b44ca Mon Sep 17 00:00:00 2001 From: Chen Dai Date: Wed, 23 Mar 2022 15:00:05 -0700 Subject: [PATCH 1/6] Upgrade lombok and JDK 17 Signed-off-by: Chen Dai --- .github/workflows/sql-test-and-build-workflow.yml | 1 + build.gradle | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sql-test-and-build-workflow.yml b/.github/workflows/sql-test-and-build-workflow.yml index 985ce5a28b..32b4a10ce9 100644 --- a/.github/workflows/sql-test-and-build-workflow.yml +++ b/.github/workflows/sql-test-and-build-workflow.yml @@ -12,6 +12,7 @@ jobs: java: - 11 - 14 + - 17 runs-on: ubuntu-latest steps: diff --git a/build.gradle b/build.gradle index 5c3222e8ce..a3777e7eee 100644 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,7 @@ plugins { id 'nebula.ospackage' version "8.3.0" id 'java-library' id 'checkstyle' - id "io.freefair.lombok" version "5.0.0-rc4" + id "io.freefair.lombok" version "6.4.0" id 'jacoco' } From d400f8b5a157bdc1a9f8f89dc120b04de2d4b5b1 Mon Sep 17 00:00:00 2001 From: Chen Dai Date: Wed, 23 Mar 2022 23:28:28 +0000 Subject: [PATCH 2/6] Upgrade mockito for JDK17 Signed-off-by: Chen Dai --- core/build.gradle | 4 ++-- legacy/build.gradle | 2 +- opensearch/build.gradle | 4 ++-- ppl/build.gradle | 2 +- protocol/build.gradle | 4 ++-- sql/build.gradle | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index 6c16b5f1f4..cd1dd53f25 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -50,8 +50,8 @@ dependencies { testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' testImplementation group: 'org.springframework', name: 'spring-test', version: '5.2.19.RELEASE' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.3.3' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.3.3' + testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.12.4' + testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4' } test { diff --git a/legacy/build.gradle b/legacy/build.gradle index 8cd146ff1c..888409e1ee 100644 --- a/legacy/build.gradle +++ b/legacy/build.gradle @@ -102,7 +102,7 @@ dependencies { compileOnly group: 'javax.servlet', name: 'servlet-api', version:'2.5' testImplementation group: 'org.hamcrest', name: 'hamcrest-core', version:'2.2' - testImplementation group: 'org.mockito', name: 'mockito-inline', version:'3.5.0' + testImplementation group: 'org.mockito', name: 'mockito-inline', version:'3.12.4' testImplementation group: 'junit', name: 'junit', version: '4.13.2' testImplementation group: "org.opensearch.client", name: 'transport', version: "${opensearch_version}" diff --git a/opensearch/build.gradle b/opensearch/build.gradle index 7f8c853b1a..a096030317 100644 --- a/opensearch/build.gradle +++ b/opensearch/build.gradle @@ -41,8 +41,8 @@ dependencies { testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.5.0' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.5.0' + testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.12.4' + testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4' testImplementation group: 'org.opensearch.client', name: 'opensearch-rest-high-level-client', version: "${opensearch_version}" testImplementation group: 'org.opensearch.test', name: 'framework', version: "${opensearch_version}" } diff --git a/ppl/build.gradle b/ppl/build.gradle index e59f89f91c..459526f608 100644 --- a/ppl/build.gradle +++ b/ppl/build.gradle @@ -57,7 +57,7 @@ dependencies { testImplementation group: 'junit', name: 'junit', version: '4.13.2' testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.3.3' + testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.12.4' } diff --git a/protocol/build.gradle b/protocol/build.gradle index 9af3dd733c..6c6a8d4740 100644 --- a/protocol/build.gradle +++ b/protocol/build.gradle @@ -39,8 +39,8 @@ dependencies { testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.3.3' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.3.3' + testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.12.4' + testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4' } test { diff --git a/sql/build.gradle b/sql/build.gradle index b851760910..62a500feda 100644 --- a/sql/build.gradle +++ b/sql/build.gradle @@ -55,8 +55,8 @@ dependencies { testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.3.3' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.3.3' + testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.12.4' + testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4' } test { From 68f1120b9b23127e151dad897251f12f872ac86b Mon Sep 17 00:00:00 2001 From: Chen Dai Date: Wed, 23 Mar 2022 23:49:28 +0000 Subject: [PATCH 3/6] Upgrade jacoco for JDK 17 Signed-off-by: Chen Dai --- build.gradle | 2 +- core/build.gradle | 3 --- opensearch/build.gradle | 3 --- ppl/build.gradle | 4 ---- protocol/build.gradle | 3 --- sql/build.gradle | 4 ---- 6 files changed, 1 insertion(+), 18 deletions(-) diff --git a/build.gradle b/build.gradle index a3777e7eee..15c14df69e 100644 --- a/build.gradle +++ b/build.gradle @@ -80,7 +80,7 @@ compileTestJava { } jacoco { - toolVersion = "0.8.5" + toolVersion = "0.8.7" } jacocoTestReport { reports { diff --git a/core/build.gradle b/core/build.gradle index cd1dd53f25..29674261b9 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -62,9 +62,6 @@ test { } } -jacoco { - toolVersion = "0.8.5" -} jacocoTestReport { reports { html.enabled true diff --git a/opensearch/build.gradle b/opensearch/build.gradle index a096030317..bbc2a0ba82 100644 --- a/opensearch/build.gradle +++ b/opensearch/build.gradle @@ -55,9 +55,6 @@ test { } } -jacoco { - toolVersion = "0.8.5" -} jacocoTestReport { reports { html.enabled true diff --git a/ppl/build.gradle b/ppl/build.gradle index 459526f608..b4257b1b74 100644 --- a/ppl/build.gradle +++ b/ppl/build.gradle @@ -68,10 +68,6 @@ test { } } -jacoco { - toolVersion = "0.8.5" -} - jacocoTestReport { reports { html.enabled true diff --git a/protocol/build.gradle b/protocol/build.gradle index 6c6a8d4740..428b244795 100644 --- a/protocol/build.gradle +++ b/protocol/build.gradle @@ -51,9 +51,6 @@ test { } } -jacoco { - toolVersion = "0.8.5" -} jacocoTestReport { reports { html.enabled true diff --git a/sql/build.gradle b/sql/build.gradle index 62a500feda..b9c93c330a 100644 --- a/sql/build.gradle +++ b/sql/build.gradle @@ -67,10 +67,6 @@ test { } } -jacoco { - toolVersion = "0.8.5" -} - jacocoTestReport { reports { html.enabled true From 70cde0ba95cbe1fe02d1dbabf4c4fce0e5a68cda Mon Sep 17 00:00:00 2001 From: Chen Dai Date: Thu, 24 Mar 2022 00:25:33 +0000 Subject: [PATCH 4/6] Add JDK17 support in sql-jdbc Signed-off-by: Chen Dai --- .../workflows/sql-jdbc-test-and-build-workflow.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sql-jdbc-test-and-build-workflow.yml b/.github/workflows/sql-jdbc-test-and-build-workflow.yml index f32cfd9511..ccb780a85a 100644 --- a/.github/workflows/sql-jdbc-test-and-build-workflow.yml +++ b/.github/workflows/sql-jdbc-test-and-build-workflow.yml @@ -4,7 +4,11 @@ on: [push, pull_request] jobs: build: - + strategy: + matrix: + java: + - 14 + - 17 runs-on: ubuntu-latest defaults: run: @@ -12,11 +16,11 @@ jobs: steps: - uses: actions/checkout@v1 - - - name: Set up JDK 1.14 + + - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v1 with: - java-version: 1.14 + java-version: ${{ matrix.java }} - name: Build with Gradle run: ./gradlew build test shadowJar From 0e55757a8233d2fbc3d44ac5f15421b5a582e1be Mon Sep 17 00:00:00 2001 From: Chen Dai Date: Thu, 24 Mar 2022 20:50:59 +0000 Subject: [PATCH 5/6] Update developer guide doc Signed-off-by: Chen Dai --- DEVELOPER_GUIDE.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEVELOPER_GUIDE.rst b/DEVELOPER_GUIDE.rst index e49b9106af..278a700e59 100644 --- a/DEVELOPER_GUIDE.rst +++ b/DEVELOPER_GUIDE.rst @@ -17,7 +17,7 @@ Prerequisites JDK --- -OpenSearch builds using Java 11 at a minimum. This means you must have a JDK 11 installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK 11 installation:: +OpenSearch builds using Java 11 at a minimum and supports JDK 11, 14 and 17. This means you must have a JDK of supported version installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK installation:: $ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home From 3160a9c883f102139f5253a4728f0286a864c131 Mon Sep 17 00:00:00 2001 From: Chen Dai Date: Fri, 25 Mar 2022 17:01:44 +0000 Subject: [PATCH 6/6] Add JDK 11 in JDBC CI Signed-off-by: Chen Dai --- .github/workflows/sql-jdbc-test-and-build-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sql-jdbc-test-and-build-workflow.yml b/.github/workflows/sql-jdbc-test-and-build-workflow.yml index ccb780a85a..c8285a1439 100644 --- a/.github/workflows/sql-jdbc-test-and-build-workflow.yml +++ b/.github/workflows/sql-jdbc-test-and-build-workflow.yml @@ -7,6 +7,7 @@ jobs: strategy: matrix: java: + - 11 - 14 - 17 runs-on: ubuntu-latest