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

Require Jenkins 2.479 or newer #1172

Merged
merged 40 commits into from
Oct 10, 2024
Merged

Conversation

MarkEWaite
Copy link
Contributor

@MarkEWaite MarkEWaite commented Aug 8, 2024

Require Jenkins 2.479 or newer

JGit 7.0.0 requires Java 17 or newer. Jenkins 2.475 requires Java 17 or newer and includes Jetty 12 and Jakarta EE 9. Jenkins 2.479 includes a security fix and is the baseline for the next LTS.

Require the Jenkins weekly is the baseline for the next LTS.

Would be nice to wait on this release until the plugin BOM is available for 2.479.x so that it can depend on the 2.479.x plugin BOM. That should happen in the plugin BOM release 15 Oct 2024.

Testing done

Interactive testing looks good and automated tests all pass.

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

@MarkEWaite MarkEWaite added the rfe Improvement or new feature label Aug 8, 2024
@MarkEWaite MarkEWaite requested a review from a team as a code owner August 8, 2024 16:42
@MarkEWaite MarkEWaite force-pushed the test-jgit-7.0.0-with-jakarta-ee-9 branch from 1705b84 to bb06bc8 Compare August 9, 2024 20:24
@MarkEWaite MarkEWaite force-pushed the test-jgit-7.0.0 branch 2 times, most recently from 6072abd to 6bfa95c Compare August 17, 2024 13:34
@MarkEWaite MarkEWaite force-pushed the test-jgit-7.0.0-with-jakarta-ee-9 branch from bb06bc8 to f3ff1ee Compare August 17, 2024 13:40
@MarkEWaite MarkEWaite marked this pull request as draft August 17, 2024 13:42
@MarkEWaite MarkEWaite force-pushed the test-jgit-7.0.0-with-jakarta-ee-9 branch from f3ff1ee to 10fb949 Compare August 17, 2024 13:47
JGit 7.0.0 requires Java 17.  Jenkins 2.463 requires Java 17.

Use the plugin bill of materials from 2.462.x because it is the closest
we have to 2.463.  The plugin is expected to work with any release 2.463
or later.
@MarkEWaite MarkEWaite force-pushed the test-jgit-7.0.0-with-jakarta-ee-9 branch from 10fb949 to 7f33b16 Compare August 17, 2024 14:04
JGit 7.0.0 requires Java 17.  Jenkins 2.463 requires Java 17.

Use the plugin bill of materials from 2.462.x because it is the closest
we have to 2.463.  The plugin is expected to work with any release 2.463
or later.

Adapt to removed API's in JGit 7.0.0 by replacing calls to removed API's
with the recommended equivalents.

Tested in my development environment and no issues detected.  Tests run
from a container based Jenkins controller with Windows, Linux, and FreeBSD
agents.  Tests ran on multiple weekly releases of Jenkins since 2.463.
The Linux agents include:

* Alpine
* Debian Linux 11, 12, testing, and unstable
* openSUSE
* Red Hat Enterprise Linux 8
* Rocky Linux 9
* Ubuntu 20.04, 22.04, and 24.04
@github-actions github-actions bot added the skip-changelog Exclude from the changelog label Oct 3, 2024
@MarkEWaite MarkEWaite removed skip-changelog Exclude from the changelog tests Automated test addition or improvement labels Oct 3, 2024
@MarkEWaite MarkEWaite changed the title Test JGit 7.0.0 with Jakarta EE 9 Jenkins core Require Jenkins 2.479 or newer Oct 3, 2024
@github-actions github-actions bot added the skip-changelog Exclude from the changelog label Oct 4, 2024
@MarkEWaite MarkEWaite marked this pull request as ready for review October 7, 2024 10:37
https://github.com/jenkinsci/plugin-pom/releases/tag/plugin-5.1 notes
that it includes a workaround the outdated ASM API inclusion that Guice
brings into Jenkins core.  Has not affected the git client plugin, but it
is good to remain current with the most recent release of the parent pom.
Cheeck if security scan is ready for Java 17 and Jakarta EE 9

This reverts commit 4bcca7e.
@basil
Copy link
Member

basil commented Oct 9, 2024

Should also migrate to EE 9:

src/main/java/hudson/plugins/git/GitTool.java
30:import org.kohsuke.stapler.StaplerRequest;
156:        public boolean configure(StaplerRequest req, JSONObject json) {

No need to rely on the compatibility layer for EE 8
MarkEWaite added a commit to MarkEWaite/bom that referenced this pull request Oct 9, 2024
* jenkinsci/git-client-plugin#1172
* jenkinsci/git-plugin#1671
* jenkinsci/scm-api-plugin#282

Changes method signatures of several methods in the git plugin from
x(StaplerRequest) to x(StaplerRequest2), but hoped that there are no
consumers of those API's outside the git plugin.
Comment on lines 63 to 64
<!-- TODO Replace with the standard jenkins.baseline references after LTS requires Java 17 -->
<!-- <jenkins.version>${jenkins.baseline}.1</jenkins.version> -->
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BOM will release Friday, then I plan to release the git client plugin 6.1.0 using that new plugin BOM release.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or maybe it is better to release git client plugin 6.1.0 before the weekly BOM so that it is available sooner to BOM consumers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The more I think about it, the more I think it is better to release this today then include it in the plugin BOM release tomorrow

@MarkEWaite MarkEWaite merged commit c372608 into master Oct 10, 2024
18 checks passed
@MarkEWaite MarkEWaite deleted the test-jgit-7.0.0-with-jakarta-ee-9 branch October 10, 2024 14:13
@MarkEWaite MarkEWaite removed the skip-changelog Exclude from the changelog label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfe Improvement or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants