Skip to content

Commit

Permalink
Require Java 17 for the build, prepare for Quarkus 3.7
Browse files Browse the repository at this point in the history
Quarkus 3.7 will [require Java 17](https://quarkus.io/blog/java-17/), so this PR prepares for this change, mostly changing existing GH workflows.

Also adds the `concurrency` config to the win/mac CI workflows.
  • Loading branch information
snazy committed Nov 30, 2023
1 parent a3efcec commit 9b1b75b
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/actions/ci-incr-build-cache-prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ inputs:
default: 'true'
java-version:
description: 'Java version'
default: '11'
default: '17'
job-id:
description: 'Job name to prefer'
default: 'nessie-ci'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/ci-incr-build-cache-save/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
description: 'job name'
java-version:
description: 'Java version'
default: '11'
default: '17'
runs:
using: "composite"
steps:
Expand Down
8 changes: 5 additions & 3 deletions .github/actions/dev-tool-java/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: 'Sets up Java + Gradle'
inputs:
java-version:
required: false
default: '11'
description: 'Java version, defaults to 11'
default: '17'
description: 'Java version, defaults to 17'
gpg-private-key:
required: false
default: ''
Expand All @@ -16,7 +16,9 @@ runs:
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ inputs.java-version }}
java-version: |
11
${{ inputs.java-version }}
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_OSSRH_TOKEN
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
uses: gradle/gradle-build-action@v2
env:
# Same as for ci.yml
GRADLE_BUILD_ACTION_CACHE_KEY_ENVIRONMENT: java-11
GRADLE_BUILD_ACTION_CACHE_KEY_ENVIRONMENT: java-17
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: nessie-ci
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_INSTANCE: ci
with:
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
# of the jobs in the checks stage are saved as artifacts (with the minimum
# retention period). The updated build cache is pushed back to GigHub's
# cache when the checks have successfully finished.
#
# Java CI runs against Java 11 and Java 17, where it is meaningful.
# (Spark tests always run against 11, so not run against Java 17.)

name: CI build

Expand Down Expand Up @@ -63,7 +60,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
java-version: ['11'] # Ideally also '17', but GH concurrent job limit ... :(
java-version: ['17']
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup runner
Expand Down Expand Up @@ -137,7 +134,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
java-version: ['11'] # Ideally also '17', but GH concurrent job limit ... :(
java-version: ['17']
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup runner
Expand Down Expand Up @@ -187,7 +184,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
java-version: ['11'] # Ideally also '17', but GH concurrent job limit ... :(
java-version: ['17']
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup runner
Expand Down Expand Up @@ -244,7 +241,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
java-version: ['11'] # Ideally also '17', but GH concurrent job limit ... :(
java-version: ['17']
env:
SPARK_LOCAL_IP: localhost
steps:
Expand Down Expand Up @@ -305,7 +302,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
java-version: ['11'] # Ideally also '17', but GH concurrent job limit ... :(
java-version: ['17']
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup runner
Expand Down Expand Up @@ -394,7 +391,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
java-version: ['11'] # Ideally also '17', but GH concurrent job limit ... :(
java-version: ['17']
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup runner
Expand Down Expand Up @@ -739,7 +736,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
java-version: 17

- name: Iceberg Nessie test
uses: gradle/gradle-build-action@v2
Expand Down Expand Up @@ -910,7 +907,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
java-version: ['11'] # Ideally also '17', but GH concurrent job limit ... :(
java-version: ['17']
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup runner
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ jobs:
## Try it
The attached [\`nessie-quarkus-${RELEASE_VERSION}-runner.jar\`](${Q_UBER_URL}) is a standalone uber-jar file that runs on Java 11 or newer and it is also available via [Maven Central](${Q_MC_URL}). Download and run it (requires Java 11):
The attached [\`nessie-quarkus-${RELEASE_VERSION}-runner.jar\`](${Q_UBER_URL}) is a standalone uber-jar file that runs on Java 17 or newer and it is also available via [Maven Central](${Q_MC_URL}). Download and run it (requires Java 17):
\`\`\`
wget ${Q_UBER_URL}
java -jar nessie-quarkus-${RELEASE_VERSION}-runner.jar
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ as necessary. Empty sections will not end in the release notes.

### Upgrade notes

* Nessie Quarkus parts are now built against Java 17 and Java 17 is required to run Nessie Quarkus Server directly.
If you use the Docker image, nothing needs to be done, because the image already contains a compatible Java runtime.

### Breaking changes

### New Features
Expand Down
6 changes: 0 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,6 @@ most likely find the Java 11 runtime required to run the Spark tests. Run `./gra
to see the Java toolchains that Gradle discovered. If Gradle could not locate your Java 11 runtime,
consult the [docs](https://docs.gradle.org/current/userguide/toolchains.html).

#### Building with Java 17 (and 16)

Due to [JEP 396](https://openjdk.java.net/jeps/396), introduced in Java 16, a couple JVM options are required for
[google-java-format](https://github.com/google/google-java-format#jdk-16) and [errorprone](https://errorprone.info/docs/installation)
to work. These options are harmless when using Java 11.

Apache Spark does **only** work with Java 11 (or 8), so all tests using Spark use the Gradle toolchain mechanism
to force Java 11 for the execution of those tests.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ docker run -p 19120:19120 \

### Requirements

- JDK 11 or higher: JDK11 or higher is needed to build Nessie (artifacts are built
for Java 8)
- JDK 17 or higher: JDK17 or higher is needed to build Nessie (some artifacts are built
for Java 8 or 11)

### Installation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ plugins {
id("nessie-testing")
}

tasks.withType<JavaCompile>().configureEach { options.release.set(11) }
tasks.withType<JavaCompile>().configureEach { options.release.set(17) }
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import java.util.Properties

includeBuild("build-logic") { name = "nessie-build-logic" }

if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
throw GradleException("Build requires Java 11")
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
throw GradleException("Build requires Java 17")
}

val baseVersion = file("version.txt").readText().trim()
Expand Down

0 comments on commit 9b1b75b

Please sign in to comment.