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 #230

Merged
merged 10 commits into from
Nov 14, 2023
Merged

Test with Java 21 #230

merged 10 commits into from
Nov 14, 2023

Conversation

MarkEWaite
Copy link
Contributor

@MarkEWaite MarkEWaite commented Oct 7, 2023

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.

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. It does not change the supported Java version or the byte code that is being generated.

Also updates the parent pom to 4.74 (most recent) and the plugin bill of materials to the most recent version.

Supersedes the following pull requests:

Testing done

Confirmed tests pass with Java 21.

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

dependabot bot and others added 7 commits April 17, 2023 17:58
Bumps [aws-java-sdk-ec2](https://github.com/jenkinsci/aws-java-sdk-plugin) from 1.12.70 to 1.12.447-382.vda_68e2007233.
- [Release notes](https://github.com/jenkinsci/aws-java-sdk-plugin/releases)
- [Changelog](https://github.com/jenkinsci/aws-java-sdk-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/aws-java-sdk-plugin/commits)

---
updated-dependencies:
- dependency-name: org.jenkins-ci.plugins.aws-java-sdk:aws-java-sdk-ec2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [bom-2.361.x](https://github.com/jenkinsci/bom) from 1766.v0b_f2a_f7d0b_1d to 2102.v854b_fec19c92.
- [Release notes](https://github.com/jenkinsci/bom/releases)
- [Commits](https://github.com/jenkinsci/bom/commits)

---
updated-dependencies:
- dependency-name: io.jenkins.tools.bom:bom-2.361.x
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [plugin](https://github.com/jenkinsci/plugin-pom) from 4.53 to 4.65.
- [Release notes](https://github.com/jenkinsci/plugin-pom/releases)
- [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md)
- [Commits](jenkinsci/plugin-pom@plugin-4.53...4.65)

---
updated-dependencies:
- dependency-name: org.jenkins-ci.plugins:plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…s-java-sdk-ec2-1.12.447-382.vda_68e2007233' into 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.

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. It does not change the supported Java version or the byte code
that is being generated.
@MarkEWaite
Copy link
Contributor Author

@andresrc or @amuniz or @escoem would you be willing to label and merge this pull request so that the plugin tests Java 21 in its standard configuration? No need for a release, just a merge.

Copy link
Member

@amuniz amuniz left a comment

Choose a reason for hiding this comment

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

It does not change the supported Java version or the byte code that is being generated.

What would be the bytecode version of the release artifacts? I guess that would still be 11 (as set in https://github.com/jenkinsci/plugin-pom/blob/587d52ab4a35a3243b550c64fa7035f6c379921e/pom.xml#L61, right)

Jenkinsfile Outdated
Comment on lines 2 to 4
[platform: 'linux', jdk: 11],
[platform: 'windows', jdk: 17],
Copy link
Member

Choose a reason for hiding this comment

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

What's the rationale behind this? Why 17 on Windows (and not 11, for example)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for asking. There are several reasons why this change chooses to test with Java 21 and Java 17 without testing Java 11 on ci.jenkins.io.

  • Java 11 byte code is generated by the Java 17 and Java 21 compilers due to the configuration of the plugin parent pom. Java 11 byte code is thus being tested with Java 17 and Java 21 runtimes
  • Java 11 compilation and test is performed for this plugin at least once a week in the plugin compatibility tests that are part of the Jenkins plugin bill of materials. The 200+ plugins included in the plugin bill of materials are acting as "safety checks" in case there is some surprise due to not compiling with Java 11 on ci.jenkins.io . Many of the plugins in the plugin BOM enabled this pattern 4-6 weeks ago. We've seen no failures due to the removal of Java 11 compilation and test on ci.jenkins.io
  • It is important to keep infrastructure costs as low as we can for ci.jenkins.io . Testing only one Windows configuration and one Linux configuration is a way of reducing those infrastructure costs. Choosing Java 17 and Java 21 improves the JDK coverage and assures that we're "looking forward"

Copy link
Member

Choose a reason for hiding this comment

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

test with Java 21 and Java 17 without testing Java 11 on ci.jenkins.io

Then you forgot to remove the Java 11 configuration entry there in the Jenkinsfile?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then you forgot to remove the Java 11 configuration entry there in the Jenkinsfile?

Thanks for catching that. Fixed in a26f4c1

@MarkEWaite
Copy link
Contributor Author

It does not change the supported Java version or the byte code that is being generated.

What would be the bytecode version of the release artifacts? I guess that would still be 11 (as set in https://github.com/jenkinsci/plugin-pom/blob/587d52ab4a35a3243b550c64fa7035f6c379921e/pom.xml#L61, right)

That's correct. The ci.jenkins.io jobs compile and test but don't release new versions of the plugin. New releases are performed with Java 11 using the continuous delivery process.

Jenkinsfile Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
@amuniz amuniz merged commit fa410de into jenkinsci:master Nov 14, 2023
14 checks passed
@MarkEWaite MarkEWaite deleted the test-with-java-21 branch November 14, 2023 12:33
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