-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ODE Java Version to Java 21 #50
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything functions with a docker-compose. The tests pass if I manually run them. Sonar seems to fail building the jpo-ode-common project though. Complaining about incompatibilities with Java 21. This may be a sonar configuration issue but I don't think it would be good to entirely break sonar unless we know what is going on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good!
Verified the following:
- Zookeeper/kafka still works in dev container
- Unit tests pass
- Program starts up without issue
I left a few clarifying questions also.
@@ -148,7 +149,7 @@ public void subscribe(String... topics) { | |||
boolean gotMessages = false; | |||
while (isRunning) { | |||
try { | |||
ConsumerRecords<K, V> records = consumer.poll(CONSUMER_POLL_TIMEOUT_MS); | |||
ConsumerRecords<K, V> records = consumer.poll(Duration.ofMillis(CONSUMER_POLL_TIMEOUT_MS)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this change necessary?
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/upload/FileUploadIntegrationTests.java
Show resolved
Hide resolved
The sonar log has this error thrown by the maven compiler plugin:
That's happening at the compilation step, before Sonar is trying to scan or anything. I think the java version it runs with is set in https://github.com/CDOT-CV/jpo-ode/blob/update/java-lts-version/.github/workflows/ci.yml current contents: name: ci
on: [pull_request, push]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build
uses: docker/build-push-action@v3
sonar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "temurin"
- name: Run Sonar
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
ls -la && pwd
mvn -e -X clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.projectKey=usdot.jpo.ode:jpo-ode -Dsonar.projectName=jpo-ode -Dsonar.organization=usdot-jpo-ode -Dsonar.host.url=https://sonarcloud.io -Dsonar.branch.name=$GITHUB_REF_NAME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good now. Same old sonar failure we have seen for a long time now.
This PR Updates the Java version used by the ODE to the latest long-term support version of Java (21)
These changes have been tested by running the ODE application in the devcontainer and by examining the output of mvn clean package
Defect fix (non-breaking change that fixes an issue)
[ X ] New feature (non-breaking change that adds functionality)
Breaking change (fix or feature that cause existing functionality to change)
[ X ] I have added any new packages to the sonar-scanner.properties file
My change requires a change to the documentation.
I have updated the documentation accordingly.
[ X ] I have read the CONTRIBUTING document.
ODE Contributing Guide
[ X ] I have added tests to cover my changes.
[ X ] All new and existing tests passed.