-
Notifications
You must be signed in to change notification settings - Fork 398
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 #368
Test with Java 21 #368
Conversation
Java 21 was released Sep 19, 2023. We want to announce full support for Java 21 in early October and would like the most used plugins to be compiled and tested 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. The change intentionally tests only two Java configurations, Java 17 and Java 21 because we believe that the risk of a regression that only affects Java 11 is low. We generate Java 11 byte code with the Java 17 and the Java 21 builds, so we're already testing Java 11 byte code. Also updates parent pom to most current release and removes unneeded hamcrest dependency declaration. Supersedes pull request: * jenkinsci#367 * jenkinsci#366 * jenkinsci#361 * jenkinsci#360 * jenkinsci#359 * jenkinsci#353 * jenkinsci#352
5c71249
to
dc2cb25
Compare
@integer , @lanwen , or @oleg-nenashev would you be willing to merge this so that the plugin is regularly tested with Java 21. No need for a release, merging the pull request is enough. |
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.
I am +1 for adding Java 21, but not sure why Java 11 is removed while we keep support for it in the plugin. Testing Java 11 bytecode on a newer JDK version is generally not enough
Address the concern that Oleg expressed in jenkinsci#368 (review) We've detected no regressions with the transition to testing Java 11 byte code as generated by Java 17 and Java 21 compilers in the 200+ plugins that have made the transition. We test with Java 11 on older lines (Jenkins 2.401.x and Jenkins 2.414.x) in the plugin bill of materials while testing with Java 21 on the most recent weekly release. We've detected no issues with any of the plugins that are included in the plugin BOM. We want to reduce Jenkins infrastructure costs by not testing configurations that are unlikely to detect issues. Testing with Java 11 is unlikely to detect issues and adds infrastructure cost. I've added Java 11 on Linux as a test configuration. I do not intend to make that same addition on the other 100+ repositories where we're testing with Java 21 and Java 17. When a plugin maintainer asks to continue testing Java 11, I'm willing to adapt that pull request.
I've pushed 6d8ef2f to address your concern @oleg-nenashev . I don't agree with the concern, but it is much more valuable to test Java 21 regularly than to exclude testing of this plugin with Java 11. We've detected no regressions with the transition to testing Java 11 byte code as generated by Java 17 and Java 21 compilers in the 200+ plugins that have made the transition. We test with Java 11 on older lines (Jenkins 2.401.x and Jenkins 2.414.x) in the plugin bill of materials while testing with Java 21 on the most recent weekly release. We've detected no issues with any of the plugins that are included in the plugin BOM. We want to reduce Jenkins infrastructure costs by not testing configurations that are unlikely to detect issues. Testing with Java 11 is unlikely to detect issues and adds infrastructure cost. However, the added infrastructure cost of a few plugins that want to continue testing with Java 11 is much less than the risk of not testing with Java 21. I've added Java 11 on Linux as a test configuration. I've made the same addition in a few other repositories when the maintainer requested that it be added. I do not intend to make that same addition in general. When a plugin maintainer asks to continue testing Java 11 for a specific pull request, I'm willing to adapt that pull request as I've done with this pull request. |
@MarkEWaite I didn't have a chance to review the previous comment but I will try to get to it ASAP. I understand the infrastructure cost implications and I definitely don't want to grow them. If we have proper coverage in BOM builds, it should be okay for integration testing |
This reverts commit 6d8ef2f.
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.
Let's align with the default practices for other plugins, at least for now. If there is a need in running more configurations, one could do it on GitHub Actions without putting pressure on the infra
Test with Java 21
Java 21 was released Sep 19, 2023. We want to announce full support for Java 21 in early October and would like the most used plugins to be compiled and tested 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.
The change intentionally tests only two Java configurations, Java 17 and Java 21 because we believe that the risk of a regression that only affects Java 11 is low. We generate Java 11 byte code with the Java 17 and the Java 21 builds, so we're already testing Java 11 byte code.
Testing done
Confirmed that tests pass with Java 21.
Submitter checklist