Skip to content

Test with jdk 24 and 25 ea - #3949

Merged
JonasKunz merged 20 commits into
elastic:mainfrom
JonasKunz:test-java24
May 27, 2025
Merged

Test with jdk 24 and 25 ea#3949
JonasKunz merged 20 commits into
elastic:mainfrom
JonasKunz:test-java24

Conversation

@JonasKunz

@JonasKunz JonasKunz commented Jan 22, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

Tests with Java 24 ea to ensure that the blocked bytebuddy-bump #3946 doesn't bite us.
Once we get notified by the JdkVersionTest about the release of Java 24, we can simply remove the -ea suffix and drop java 23 from the list.

@JonasKunz JonasKunz added the ci:jdk-compatibility Enables JDK compatibility tests in build pipeline label Jan 22, 2025
@JonasKunz

Copy link
Copy Markdown
Contributor Author

We'll keep this PR around and monitor the inferred spans support closer to release.

@github-actions github-actions Bot added community Issues and PRs created by the community triage labels May 26, 2025
@JonasKunz JonasKunz changed the title Test with jdk 24 ea Test with jdk 24 and 25 ea May 26, 2025
@JonasKunz JonasKunz assigned JonasKunz and unassigned SylvainJuge May 26, 2025
@JonasKunz JonasKunz added ci:jdk-compatibility Enables JDK compatibility tests in build pipeline and removed community Issues and PRs created by the community ci:jdk-compatibility Enables JDK compatibility tests in build pipeline triage labels May 26, 2025
@github-actions github-actions Bot added community Issues and PRs created by the community triage labels May 26, 2025
@JonasKunz JonasKunz removed community Issues and PRs created by the community triage labels May 27, 2025
@github-actions github-actions Bot added community Issues and PRs created by the community triage labels May 27, 2025
@JonasKunz
JonasKunz marked this pull request as ready for review May 27, 2025 12:07

@JonasKunz JonasKunz left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This PR has shown some test behaviour which has certainly been amongst the most confusing things I've encountered during my tenure at elastic so far. But hey, tests are finally green!

Comment thread pom.xml
<version.error_prone>2.2.0</version.error_prone>
<version.h2>1.4.196</version.h2>
<version.junit>5.9.1</version.junit>
<version.junit>5.12.2</version.junit>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

JUnit had to be updated to include the newer java versions in @DisabledForJRE



static synchronized void initAllButInstrumentation() {
ElasticApmAgent.reset(); // reset the AbstractInstrumentationTest beforeAll initialization

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The JUnit upgrade made the lambda tests fail.
They apparently have been relieing on a bug where static @BeforeAll methods from subclasses would replace static @BeforeAll in parent methods. Now they both execute, causing the tracer to be initialized twice.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

that's lol

@jackshirazi

Copy link
Copy Markdown
Contributor

we lose inferred spans after 23?

@JonasKunz

Copy link
Copy Markdown
Contributor Author

we lose inferred spans after 23?

Yes, due to async-profiler 1.x not working correctly there. We will need to upgrade it to support it.

@JonasKunz
JonasKunz merged commit 50470af into elastic:main May 27, 2025
@JonasKunz
JonasKunz deleted the test-java24 branch June 16, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-java ci:jdk-compatibility Enables JDK compatibility tests in build pipeline community Issues and PRs created by the community triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants