This is an automated email from the ASF dual-hosted git repository.
snuyanzin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite.git
The following commit(s) were added to refs/heads/main by this push:
new 3e633f6278 [CALCITE-6387] Make Arrow adapter passing tests with jdk17+
3e633f6278 is described below
commit 3e633f627814ca79d1e2c592cd2ce1384717d6ca
Author: Sergey Nuyanzin <[email protected]>
AuthorDate: Sat Apr 27 16:35:02 2024 +0200
[CALCITE-6387] Make Arrow adapter passing tests with jdk17+
---
.github/workflows/main.yml | 9 ---------
Jenkinsfile | 4 +---
arrow/build.gradle.kts | 11 +++++++++++
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 0ff5ab00f9..3a9ae23fce 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -219,9 +219,6 @@ jobs:
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
- # The following option `--add-opens=java.base/java.nio=ALL-UNNAMED`
is required jdk17+
- # to avoid error. See
https://arrow.apache.org/docs/java/install.html#java-compatibility
- _JAVA_OPTIONS: ${{ env._JAVA_OPTIONS }}
--add-opens=java.base/java.nio=ALL-UNNAMED
with:
job-id: jdk${{ matrix.jdk }}
remote-build-cache-proxy-enabled: false
@@ -248,9 +245,6 @@ jobs:
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
- # The following option `--add-opens=java.base/java.nio=ALL-UNNAMED`
is required jdk17+
- # to avoid error. See
https://arrow.apache.org/docs/java/install.html#java-compatibility
- _JAVA_OPTIONS: ${{ env._JAVA_OPTIONS }}
--add-opens=java.base/java.nio=ALL-UNNAMED
with:
job-id: jdk${{ matrix.jdk }}
remote-build-cache-proxy-enabled: false
@@ -320,9 +314,6 @@ jobs:
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
- # The following option `--add-opens=java.base/java.nio=ALL-UNNAMED`
is required jdk17+
- # to avoid error. See
https://arrow.apache.org/docs/java/install.html#java-compatibility
- _JAVA_OPTIONS: ${{ env._JAVA_OPTIONS }}
--add-opens=java.base/java.nio=ALL-UNNAMED
with:
job-id: jdk19
remote-build-cache-proxy-enabled: false
diff --git a/Jenkinsfile b/Jenkinsfile
index bd4216c05e..53cc1e6f31 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -41,9 +41,7 @@ node('ubuntu') {
}
stage('Code Quality') {
timeout(time: 1, unit: 'HOURS') {
- // The following option `--add-opens=java.base/java.nio=ALL-UNNAMED` is
required jdk17+
- // to avoid error. See
https://arrow.apache.org/docs/java/install.html#java-compatibility
-
withEnv(["Path+JDK=$JAVA_JDK_17/bin","JAVA_HOME=$JAVA_JDK_17","_JAVA_OPTIONS=--add-opens=java.base/java.nio=ALL-UNNAMED"])
{
+ withEnv(["Path+JDK=$JAVA_JDK_17/bin","JAVA_HOME=$JAVA_JDK_17"]) {
withCredentials([string(credentialsId: 'SONARCLOUD_TOKEN', variable:
'SONAR_TOKEN')]) {
if ( env.BRANCH_NAME.startsWith("PR-") ) {
sh './gradlew --no-parallel --no-daemon jacocoAggregateTestReport
sonar -PenableJacoco -Dsonar.pullrequest.branch=${CHANGE_BRANCH}
-Dsonar.pullrequest.base=${CHANGE_TARGET} -Dsonar.pullrequest.key=${CHANGE_ID}
-Dsonar.login=${SONAR_TOKEN}'
diff --git a/arrow/build.gradle.kts b/arrow/build.gradle.kts
index 0ed73e8ddf..402ad4f03d 100644
--- a/arrow/build.gradle.kts
+++ b/arrow/build.gradle.kts
@@ -14,6 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+import com.github.vlsi.gradle.dsl.configureEach
+
dependencies {
api(project(":core"))
@@ -30,3 +32,12 @@ dependencies {
testImplementation(project(":core"))
testImplementation(project(":testkit"))
}
+
+plugins.withType<JavaPlugin> {
+ tasks {
+ configureEach<Test> {
+ jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
+ jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED")
+ }
+ }
+}