⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@Siman-hub
Copy link

@Siman-hub Siman-hub commented Jan 16, 2026

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:

  1. Build Configuration (pom.xml):

    • Upgraded lombok to 1.18.40 to support JDK 25.
    • Configured maven-compiler-plugin to explicitly define annotationProcessorPaths. This resolves compilation issues where the annotation processor was not correctly discovered on newer JDKs.
    • Compatibility: Verified that maven.compiler.source and target remain at 11 to ensure the project can still be built and run on older LTS versions (11, 17, 21).
  2. CI Matrices (skywalking.yaml):

    • Added 25 to the java-version matrix for Unit Tests, Integration Tests, and E2E Tests.
  3. Docker Release (publish-docker.yaml):

    • Added a dedicated build step to publish the official image based on eclipse-temurin:25-jre.
  4. Documentation:

    • Updated How-to-build.md to include JDK 25 in the supported versions list.
    • Added an entry to changes/changes.md.

Testing:

  • JDK 25: Verified mvn clean package passes locally.
  • JDK 21: Verified mvn clean package passes locally (backward compatibility confirmed).

Checklist

  • Update the documentation to include this new feature.
  • Tests (including UT, IT, E2E) are added to verify the new feature.

@wu-sheng
Copy link
Member

You need to resolve conflicts.

@wu-sheng wu-sheng added backend OAP backend related. dependencies Pull requests that update a dependency file labels Jan 16, 2026
@wu-sheng wu-sheng added this to the 10.4.0 milestone Jan 16, 2026
@wu-sheng
Copy link
Member

Look like one UT fails. Could you verify locally?

@Siman-hub
Copy link
Author

Look like one UT fails. Could you verify locally?

Thanks for the heads-up.
I’ll run the failing UT locally on JDK 25 and report back shortly.

@Siman-hub
Copy link
Author

Look like one UT fails. Could you verify locally?

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.

@Siman-hub
Copy link
Author

Siman-hub commented Jan 16, 2026

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:

  1. Groovy Upgrade: Upgraded meter-analyzer to 4.0.29 for Java 25 bytecode support.

  2. Mockito 5 Overrides: Forced Mockito 5.11.0 and ByteBuddy 1.17.0 only in modules that fail on JDK 25 (server-core, library-util, library-datacarrier-queue, and meter-analyzer). This keeps the Root POM stable for legacy modules.

  3. Spying Safety: Added an isMock() check in AnalyzerTest.java to handle Mockito 5's stricter "spy-on-spy" validation.

  4. License Compliance: Updated dist-material/release-docs/LICENSE to reflect the Groovy 4.0.29 version.

  5. Manual Test Results: Verified that server-core, library-util, and meter-analyzer pass all tests on JDK 25 locally.

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.11.0</version>
Copy link
Member

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>
Copy link
Member

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
Copy link
Member

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>
Copy link
Member

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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this added?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is added to enable Lombok annotation processing explicitly. Without it, the E2E Java test service fails to compile under JDK 25 (missing Lombok-generated methods like builder()), while older JDKs work implicitly. This keeps the behavior consistent across JDK versions.

@wu-sheng
Copy link
Member

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:

  1. Groovy Upgrade: Upgraded meter-analyzer to 4.0.29 for Java 25 bytecode support.
  2. Mockito 5 Overrides: Forced Mockito 5.11.0 and ByteBuddy 1.17.0 only in modules that fail on JDK 25 (server-core, library-util, library-datacarrier-queue, and meter-analyzer). This keeps the Root POM stable for legacy modules.

We prefer consistent and unified version in the project level. Please update by following this principal.

  1. Spying Safety: Added an isMock() check in AnalyzerTest.java to handle Mockito 5's stricter "spy-on-spy" validation.
  2. License Compliance: Updated dist-material/release-docs/LICENSE to reflect the Groovy 4.0.29 version.
  3. Manual Test Results: Verified that server-core, library-util, and meter-analyzer pass all tests on JDK 25 locally.

@wu-sheng
Copy link
Member

And there is a mock error in the CI. please recheck it.

@Siman-hub
Copy link
Author

And there is a mock error in the CI. please recheck it.

Thanks for the review.

I’ve updated the PR to:

  1. move dependency versions into BOM / dependencyManagement as suggested

  2. fix the Mockito mock/spy issue reported in CI

  3. keep module POMs version-free

I’ll recheck and follow up if anything else fails.

@wu-sheng
Copy link
Member

There are some test errors of e2e codes. There are some mock app in Java as well. When you changed the JDK to compile the whole thing, it fails.

https://github.com/apache/skywalking/blob/master/test/e2e-v2/java-test-service/pom.xml

@wu-sheng
Copy link
Member

And UT(MeterProcessorTest) fails according to CI logs.

@Siman-hub
Copy link
Author

And UT(MeterProcessorTest) fails according to CI logs.

Thanks for pointing this out.
I’ll focus next on fixing the E2E Java test service issues under JDK 25 (java-test-service) and rechecking MeterProcessorTest failures based on the CI logs.
I’ll update the PR once these are resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend OAP backend related. dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants