-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Support Java 25 for build, test, and Docker publishing #13671
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
base: master
Are you sure you want to change the base?
Conversation
|
You need to resolve conflicts. |
|
Look like one UT fails. Could you verify locally? |
Thanks for the heads-up. |
I verified this locally. The unit test failure was indeed due to the old Mockito 4.x / ByteBuddy 1.14 dependencies being incompatible with JDK 25. |
|
Update of JDK 25 Support Fixes: I have successfully verified this build locally on both JDK 21 and JDK 25. To achieve compatibility without disrupting the existing project baseline, I implemented the following:
|
| <dependency> | ||
| <groupId>org.mockito</groupId> | ||
| <artifactId>mockito-core</artifactId> | ||
| <version>5.11.0</version> |
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.
Please move all dependency version update into bom. Each module should not have its specific version.
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>net.bytebuddy</groupId> |
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.
Same for bytebuddy. You should update bom, dependency management.
| Whitebox.setInternalState(MetricsStreamProcessor.class, "PROCESSOR", | ||
| Mockito.spy(MetricsStreamProcessor.getInstance()) | ||
| ); | ||
| // Fix for JDK 25 / Mockito 5: Prevent double-spying on the singleton |
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.
About comments, please align with the code indentation.
| <dependency> | ||
| <groupId>org.mockito</groupId> | ||
| <artifactId>mockito-core</artifactId> | ||
| <version>5.11.0</version> |
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.
Same version management required, same as previous.
| <build> | ||
| <pluginManagement> | ||
| <plugins> | ||
| <plugin> |
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 is this added?
We prefer consistent and unified version in the project level. Please update by following this principal.
|
|
And there is a mock error in the CI. please recheck it. |
Feature Description
This PR introduces comprehensive support for JDK 25 across the build system, CI, and Docker release workflows, while maintaining backward compatibility for JDK 11-21.
Changes:
Build Configuration (
pom.xml):lombokto1.18.40to support JDK 25.maven-compiler-pluginto explicitly defineannotationProcessorPaths. This resolves compilation issues where the annotation processor was not correctly discovered on newer JDKs.maven.compiler.sourceandtargetremain at11to ensure the project can still be built and run on older LTS versions (11, 17, 21).CI Matrices (
skywalking.yaml):25to thejava-versionmatrix for Unit Tests, Integration Tests, and E2E Tests.Docker Release (
publish-docker.yaml):eclipse-temurin:25-jre.Documentation:
How-to-build.mdto include JDK 25 in the supported versions list.changes/changes.md.Testing:
mvn clean packagepasses locally.mvn clean packagepasses locally (backward compatibility confirmed).Checklist