Skip to content

Commit

Permalink
Merge pull request Netflix#3733 from alexmay48/alexmay48/java17-update
Browse files Browse the repository at this point in the history
Update to Java 17
  • Loading branch information
v1r3n authored Sep 16, 2023
2 parents 50b6fd4 + cfa1591 commit 013e820
Show file tree
Hide file tree
Showing 38 changed files with 352 additions and 122 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
fetch-depth: 0
- name: Gradle wrapper validation
uses: gradle/wrapper-validation-action@v1
- name: Set up Zulu JDK 11
- name: Set up Zulu JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
Expand All @@ -38,6 +38,16 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
./gradlew build --scan
- name: Print Server Logs
if: always()
run: |
cat conductor_tests.log
- name: Publish server logs
if: always()
uses: actions/upload-artifact@v3
with:
name: server-logs
path: conductor_tests.log
- name: Build and Publish snapshot
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
name: Gradle Build and Publish
steps:
- uses: actions/checkout@v3
- name: Set up Zulu JDK 11
- name: Set up Zulu JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'
- name: Cache Gradle packages
uses: actions/cache@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-gradle-wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Zulu JDK 11
- name: Set up Zulu JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'
- name: Update Gradle Wrapper
uses: gradle-update/update-gradle-wrapper-action@v1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Binaries are available from [Netflix OSS Maven](https://artifacts.netflix.net/ne
* The indexing backend is [Elasticsearch](https://www.elastic.co/) (6.x)

## Other Requirements
* JDK 11+
* JDK 17+
* UI requires Node 14 to build. Earlier Node versions may work but is untested.

## Get Support
Expand Down
12 changes: 12 additions & 0 deletions awss3-storage/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@
"com.netflix.conductor:conductor-core"
],
"locked": "2.17.2"
},
"org.openjdk.nashorn:nashorn-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "15.4"
}
},
"testCompileClasspath": {
Expand Down Expand Up @@ -392,6 +398,12 @@
"org.junit.vintage:junit-vintage-engine": {
"locked": "5.8.2"
},
"org.openjdk.nashorn:nashorn-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "15.4"
},
"org.springframework.boot:spring-boot-starter-log4j2": {
"locked": "2.7.3"
},
Expand Down
12 changes: 12 additions & 0 deletions awssqs-event-queue/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@
"com.netflix.conductor:conductor-core"
],
"locked": "2.17.2"
},
"org.openjdk.nashorn:nashorn-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "15.4"
}
},
"testCompileClasspath": {
Expand Down Expand Up @@ -413,6 +419,12 @@
"org.junit.vintage:junit-vintage-engine": {
"locked": "5.8.2"
},
"org.openjdk.nashorn:nashorn-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "15.4"
},
"org.springframework.boot:spring-boot-starter": {
"locked": "2.7.3"
},
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ allprojects {
apply plugin: 'java-library'
apply plugin: 'project-report'

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

group = 'com.netflix.conductor'

Expand Down Expand Up @@ -164,11 +164,11 @@ allprojects {
}
}

// all client and their related modules are published with Java 11 compatibility
// all client and their related modules are published with Java 17 compatibility
["annotations", "common", "client", "client-spring", "grpc", "grpc-client"].each {
project(":conductor-$it") {
compileJava {
options.release = 11
options.release = 17
}
}
}
Expand Down
16 changes: 14 additions & 2 deletions cassandra-persistence/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@
"com.netflix.conductor:conductor-core"
],
"locked": "2.17.2"
},
"org.openjdk.nashorn:nashorn-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "15.4"
}
},
"testCompileClasspath": {
Expand Down Expand Up @@ -226,7 +232,7 @@
"locked": "2.17.2"
},
"org.codehaus.groovy:groovy-all": {
"locked": "2.5.13"
"locked": "2.5.22"
},
"org.junit.vintage:junit-vintage-engine": {
"locked": "5.8.2"
Expand Down Expand Up @@ -408,11 +414,17 @@
"locked": "2.17.2"
},
"org.codehaus.groovy:groovy-all": {
"locked": "2.5.13"
"locked": "2.5.22"
},
"org.junit.vintage:junit-vintage-engine": {
"locked": "5.8.2"
},
"org.openjdk.nashorn:nashorn-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "15.4"
},
"org.spockframework:spock-core": {
"locked": "1.3-groovy-2.5"
},
Expand Down
12 changes: 12 additions & 0 deletions client-spring/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@
],
"locked": "2.35"
},
"org.openjdk.nashorn:nashorn-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-java-sdk"
],
"locked": "15.4"
},
"org.slf4j:slf4j-api": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-client"
Expand Down Expand Up @@ -446,6 +452,12 @@
"org.junit.vintage:junit-vintage-engine": {
"locked": "5.8.2"
},
"org.openjdk.nashorn:nashorn-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-java-sdk"
],
"locked": "15.4"
},
"org.slf4j:slf4j-api": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-client"
Expand Down
4 changes: 2 additions & 2 deletions client/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
"locked": "2.17.2"
},
"org.codehaus.groovy:groovy-all": {
"locked": "2.5.13"
"locked": "2.5.22"
},
"org.glassfish.jersey.core:jersey-common": {
"locked": "2.22.2"
Expand Down Expand Up @@ -361,7 +361,7 @@
"locked": "2.17.2"
},
"org.codehaus.groovy:groovy-all": {
"locked": "2.5.13"
"locked": "2.5.22"
},
"org.glassfish.jersey.core:jersey-common": {
"locked": "2.22.2"
Expand Down
2 changes: 2 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ dependencies {

implementation "com.github.ben-manes.caffeine:caffeine"

implementation "org.openjdk.nashorn:nashorn-core:15.4"

// JAXB is not bundled with Java 11, dependencies added explicitly
// These are needed by Apache BVAL
implementation "jakarta.xml.bind:jakarta.xml.bind-api:${revJAXB}"
Expand Down
16 changes: 14 additions & 2 deletions core/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
"org.apache.logging.log4j:log4j-web": {
"locked": "2.17.2"
},
"org.openjdk.nashorn:nashorn-core": {
"locked": "15.4"
},
"org.springframework.boot:spring-boot-starter": {
"locked": "2.7.3"
},
Expand Down Expand Up @@ -182,6 +185,9 @@
"com.netflix.conductor:conductor-common"
],
"locked": "2.17.2"
},
"org.openjdk.nashorn:nashorn-core": {
"locked": "15.4"
}
},
"testCompileClasspath": {
Expand Down Expand Up @@ -249,14 +255,17 @@
"locked": "2.17.2"
},
"org.codehaus.groovy:groovy-all": {
"locked": "2.5.13"
"locked": "2.5.22"
},
"org.glassfish.jaxb:jaxb-runtime": {
"locked": "2.3.3"
},
"org.junit.vintage:junit-vintage-engine": {
"locked": "5.8.2"
},
"org.openjdk.nashorn:nashorn-core": {
"locked": "15.4"
},
"org.spockframework:spock-core": {
"locked": "1.3-groovy-2.5"
},
Expand Down Expand Up @@ -388,14 +397,17 @@
"locked": "2.17.2"
},
"org.codehaus.groovy:groovy-all": {
"locked": "2.5.13"
"locked": "2.5.22"
},
"org.glassfish.jaxb:jaxb-runtime": {
"locked": "2.3.3"
},
"org.junit.vintage:junit-vintage-engine": {
"locked": "5.8.2"
},
"org.openjdk.nashorn:nashorn-core": {
"locked": "15.4"
},
"org.spockframework:spock-core": {
"locked": "1.3-groovy-2.5"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

public class ScriptEvaluator {

private static final ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn");
private static ScriptEngine engine;

private ScriptEvaluator() {}

Expand All @@ -45,6 +45,13 @@ public static Boolean evalBool(String script, Object input) throws ScriptExcepti
* @return Generic object, the result of the evaluated expression.
*/
public static Object eval(String script, Object input) throws ScriptException {
if (engine == null) {
engine = new ScriptEngineManager().getEngineByName("Nashorn");
}
if (engine == null) {
throw new RuntimeException(
"missing nashorn engine. Ensure you are running supported JVM");
}
Bindings bindings = engine.createBindings();
bindings.put("$", input);
return engine.eval(script, bindings);
Expand Down
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ext {
revElasticSearch6 = '6.8.12'
revEmbeddedRedis = '0.6'
revEurekaClient = '1.10.10'
revGroovy = '2.5.13'
revGroovy = '2.5.22'
revGrpc = '1.+'
revGuava = '30.0-jre'
revHamcrestAllMatchers = '1.8'
Expand Down
2 changes: 1 addition & 1 deletion docker/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:11-jdk
FROM openjdk:17-jdk

WORKDIR /workspace/conductor
COPY . /workspace/conductor
Expand Down
4 changes: 2 additions & 2 deletions docker/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# ===========================================================================================================
# 0. Builder stage
# ===========================================================================================================
FROM eclipse-temurin:11-jdk-jammy AS builder
FROM eclipse-temurin:17-jdk-focal AS builder

LABEL maintainer="Netflix OSS <conductor@netflix.com>"

Expand All @@ -19,7 +19,7 @@ RUN ./gradlew build -x test --stacktrace
# ===========================================================================================================
# 1. Bin stage
# ===========================================================================================================
FROM eclipse-temurin:11-jre-jammy
FROM eclipse-temurin:17-jre-focal

LABEL maintainer="Netflix OSS <conductor@netflix.com>"

Expand Down
4 changes: 2 additions & 2 deletions docker/serverAndUI/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# ===========================================================================================================
# 0. Builder stage
# ===========================================================================================================
FROM openjdk:11-jdk AS builder
FROM openjdk:17-jdk AS builder
LABEL maintainer="Netflix OSS <conductor@netflix.com>"

# Install Node
Expand Down Expand Up @@ -36,7 +36,7 @@ RUN yarn install && yarn build
# ===========================================================================================================

FROM nginx:alpine
RUN apk add openjdk11-jre
RUN apk add openjdk17-jre

LABEL maintainer="Netflix OSS <conductor@netflix.com>"

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/gettingstarted/source.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ In this article we will explore how you can set up Netflix Conductor on your loc
features.

### Prerequisites
1. JDK 11 or greater
1. JDK 17 or greater
2. (Optional) Docker if you want to run tests. You can install docker from [here](https://www.docker.com/get-started/).
3. Node for building and running UI. Instructions at [https://nodejs.org](https://nodejs.org).
4. Yarn for building and running UI. Instructions at [https://classic.yarnpkg.com/en/docs/install](https://classic.yarnpkg.com/en/docs/install).
Expand Down
Loading

0 comments on commit 013e820

Please sign in to comment.