Skip to content
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

Test with Java 21 #271

Merged
merged 1 commit into from
Oct 12, 2023
Merged

Test with Java 21 #271

merged 1 commit into from
Oct 12, 2023

Conversation

MarkEWaite
Copy link
Contributor

Test with Java 21

Java 21 released Sep 19, 2023. We'd like to announce full support for Java 21 in early October and would like the most used plugins to be compiling and testing with Java 21.

The acceptance test harness and plugin bill of materials tests are already passing with Java 21. This is a further step to improve plugin readiness for use with Java 21 and for development with Java 21.

Not testing Java 11 because Java 11 byte code is being generated by the Java 17 compiler and the Java 21 compiler. The plugin bill of materials runs the tests with Java 11 as well.

Java 11 will be unsupported by Eclipse Temurin and some other Java providers in October 2024. We'll need to move past Java 11 by that time, so this makes the transition in test configuration. It does not change the supported Java version or the byte code that is being generated.

Testing done

Confirmed tests pass with Java 21 on Linux.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Java 21 released Sep 19, 2023. We'd like to announce full support for
Java 21 in early October and would like the most used plugins to be
compiling and testing with Java 21.

The acceptance test harness and plugin bill of materials tests are already
passing with Java 21. This is a further step to improve plugin readiness
for use with Java 21 and for development with Java 21.

Not testing Java 11 because Java 11 byte code is being generated by the
Java 17 compiler and the Java 21 compiler. The plugin bill of materials
runs the tests with Java 11 as well.

Java 11 will be unsupported by Eclipse Temurin and some other Java
providers in October 2024. We'll need to move past Java 11 by that time,
so this makes the transition in test configuration. It does not change
the supported Java version or the byte code that is being generated.
@MarkEWaite MarkEWaite requested a review from a team as a code owner October 7, 2023 21:55
@dblock
Copy link
Member

dblock commented Oct 9, 2023

Should we keep the [platform: 'linux', jdk: 17] test?

@MarkEWaite
Copy link
Contributor Author

Should we keep the [platform: 'linux', jdk: 17] test?

I'd prefer to not keep the Linux tests of Java 17. We've been intentionally choosing to test the minimum combination of platforms so that we can reduce the cost of ci.jenkins.io jobs. We've been using minimal combinations for many months with no detected issues that were missed due to using the minimum combination of platforms. This is one of those cases where Java's platform independence works in our favor.

@MarkEWaite
Copy link
Contributor Author

Should we keep the [platform: 'linux', jdk: 17] test?

However, if that's a requirement from you as a maintainer, then I'm willing to make that change in the pull request. I'd rather increase the CI cost this plugin than not test this plugin with Java 21.

@dblock
Copy link
Member

dblock commented Oct 12, 2023

It's fine, unless we start introducing JDK 21 code and never catch bugs. I'll merge as is.

@dblock dblock merged commit c7d16d7 into jenkinsci:master Oct 12, 2023
15 checks passed
@MarkEWaite MarkEWaite deleted the test-with-java-21 branch October 12, 2023 20:39
@MarkEWaite
Copy link
Contributor Author

It's fine, unless we start introducing JDK 21 code and never catch bugs. I'll merge as is.

The current tooling will fail compilation if someone attempts to introduce Java 21 code. It generates Java 11 byte code and if an attempt is made to use a Java 21 feature, that will fail in byte code generation. If not at that point, then it will fail in the Java 17 test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants