Skip to content

Require Java 21 or newer#26018

Merged
NotMyFault merged 4 commits intojenkinsci:masterfrom
uhafner:java21
Jan 3, 2026
Merged

Require Java 21 or newer#26018
NotMyFault merged 4 commits intojenkinsci:masterfrom
uhafner:java21

Conversation

@uhafner
Copy link
Member

@uhafner uhafner commented Dec 30, 2025

As Java 25 is available for a couple of months now, it is time to drop support for Java 17. When this PR is merged, Jenkins will support only Java 21 and 25, or newer.

See Java support plan and mailing list discussion.

Proposed changelog entries

  • Require Java 21 or newer.

Proposed changelog category

/label major-rfe

Proposed upgrade guidelines

N/A

Submitter checklist

  • The issue, if it exists, is well-described.
  • The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see examples). Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during upgrade.
  • There is automated testing or an explanation as to why this change has no tests.
  • New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadocs, as appropriate.
  • New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO"), if applicable.
  • UI changes do not introduce regressions when enforcing the current default rules of Content Security Policy Plugin. In particular, new or substantially changed JavaScript is not defined inline and does not call eval to ease future introduction of Content Security Policy (CSP) directives (see documentation).
  • For dependency updates, there are links to external changelogs and, if possible, full differentials.
  • For new APIs and extension points, there is a link to at least one consumer.

Desired reviewers

@mention

Before the changes are marked as ready-for-merge:

Maintainer checklist

  • There are at least two (2) approvals for the pull request and no outstanding requests for change.
  • Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
  • Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
  • Proper changelog labels are set so that the changelog can be generated automatically.
  • If the change needs additional upgrade steps from users, the upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).
  • If it would make sense to backport the change to LTS, be a Bug or Improvement, and either the issue or pull request must be labeled as lts-candidate to be considered.

As Java 25 is available for a couple of months now,
it is time to drop support for Java 17. Starting with this commit, Jenkins supports only Java 21 and 25, or newer.

See https://www.jenkins.io/blog/2023/11/06/introducing-2-2-2-java-support-plan/.
@NotMyFault

This comment was marked as outdated.

@MarkEWaite
Copy link
Contributor

Before we make progress here, I'd recommend putting an administrative monitor in place, as we did before, when we made the cut with earlier versions, and announcing a final date when we make this transition. The monitors should be present at least in one LTS line.

This helps people to raise awareness of the upcoming change. Not everyone is aware of our 2 + 2 + 2 policy, and due to the complexity of some instances, it sometimes takes months to update something.

I don't think we need an additional administrative monitor. The Java 17 administrative monitor has been telling users that Java 17 support will end March 31, 2026. I believe it is configured to start showing that warning 6 months prior to the end of life. The warning looks like this:

screencapture-fedora-a-markwaite-net-8080-manage-2025-12-30-20_04_39-edit

The LTS release would transition April 15, 2026, the release of the next LTS baseline after 2.541.x

@NotMyFault NotMyFault added the upgrade-guide-needed This change might be breaking in rare circumstances, an entry in the LTS upgrade guide is needed label Dec 31, 2025
@NotMyFault
Copy link
Member

NotMyFault commented Jan 1, 2026

Before we make progress here, I'd recommend putting an administrative monitor in place, as we did before, when we made the cut with earlier versions, and announcing a final date when we make this transition. The monitors should be present at least in one LTS line.
This helps people to raise awareness of the upcoming change. Not everyone is aware of our 2 + 2 + 2 policy, and due to the complexity of some instances, it sometimes takes months to update something.

I don't think we need an additional administrative monitor. The Java 17 administrative monitor has been telling users that Java 17 support will end March 31, 2026. I believe it is configured to start showing that warning 6 months prior to the end of life. The warning looks like this:

screencapture-fedora-a-markwaite-net-8080-manage-2025-12-30-20_04_39-edit The LTS release would transition April 15, 2026, the release of the next LTS baseline after 2.541.x

My bad! I didn't check for existing admin monitors in place. That's a good catch; we don't need another one. I've dismissed my concern.

@NotMyFault NotMyFault requested review from mawinter69 and timja January 2, 2026 12:54
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

🎉

Some US_USELESS_SUPPRESSION_ON_CLASS probably due to javac changes.

@timja timja added the major-rfe For changelog: Major enhancement. Will be highlighted on the top label Jan 2, 2026
@timja
Copy link
Member

timja commented Jan 2, 2026

/label ready-for-merge


This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.

Thanks!

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Jan 2, 2026
@NotMyFault NotMyFault merged commit 5312d24 into jenkinsci:master Jan 3, 2026
18 of 19 checks passed
MarkEWaite added a commit to MarkEWaite/jenkins that referenced this pull request Jan 4, 2026
Breaks plugin BOM

This reverts commit 5312d24.
MarkEWaite added a commit to MarkEWaite/acceptance-test-harness that referenced this pull request Jan 4, 2026
@krisstern krisstern added major-rfe For changelog: Major enhancement. Will be highlighted on the top and removed major-rfe For changelog: Major enhancement. Will be highlighted on the top labels Jan 4, 2026
shalinisudarsan pushed a commit to shalinisudarsan/jenkins that referenced this pull request Jan 6, 2026
Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
(cherry picked from commit 5312d24)
MarkEWaite added a commit to MarkEWaite/jenkins that referenced this pull request Jan 6, 2026
Changed in the jenkins.io documentation with pull request:

* jenkins-infra/jenkins.io#8680

Removes the backport of pull request:

* jenkins-infra/jenkins.io#8675

Issue report:

* jenkinsci#26039

This reverts commit 5afa4b4.
shalinisudarsan pushed a commit to shalinisudarsan/jenkins that referenced this pull request Jan 29, 2026
Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
(cherry picked from commit 5312d24)
shalinisudarsan pushed a commit to shalinisudarsan/jenkins that referenced this pull request Jan 29, 2026
Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
(cherry picked from commit 5312d24)
shalinisudarsan pushed a commit to shalinisudarsan/jenkins that referenced this pull request Jan 29, 2026
Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
(cherry picked from commit 5312d24)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

major-rfe For changelog: Major enhancement. Will be highlighted on the top ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback upgrade-guide-needed This change might be breaking in rare circumstances, an entry in the LTS upgrade guide is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants