Skip to content

[improve][build] Switch default JDK to 25 for 5.0.0-M2#26070

Open
lhotari wants to merge 1 commit into
apache:masterfrom
lhotari:lh-improve-default-jdk-25-for-m2
Open

[improve][build] Switch default JDK to 25 for 5.0.0-M2#26070
lhotari wants to merge 1 commit into
apache:masterfrom
lhotari:lh-improve-default-jdk-25-for-m2

Conversation

@lhotari

@lhotari lhotari commented Jun 20, 2026

Copy link
Copy Markdown
Member

Motivation

Making JDK 25 the default was agreed on the dev@ mailing list:
https://lists.apache.org/thread/3zclb8cq0dt95c8f1lh83qxyyj11m8pq

As part of the release planning, 4.3.0 was renamed to 5.0.0-M1:
https://lists.apache.org/thread/1hyrcq11jbczdkmqqw07h5qq6fyfxoj7

5.0.0-M1 ships with Java 21 as the default and is being released from the
already-cut branch-5.0-M1. The switch to Java 25 lands in 5.0.0-M2, which
is the master development line now that the M1 release branch exists. This change
therefore targets master only; branch-5.0-M1 keeps Java 21 as its default.

Modifications

  • gradle/libs.versions.toml: docker-jdk 2125, so the official Pulsar
    Docker image is built on JDK 25 by default.
  • .github/workflows/pulsar-ci.yaml and .github/workflows/pulsar-ci-flaky.yaml
    — make JDK 25 the primary JDK and keep JDK 21 as the secondary scheduled run (swap):
    • workflow_dispatch jdk_major_version input: default 2125 (options reordered 25, 21).
    • Select JDK major version step: the default fallback (pull requests, pushes, and the
      0 12 * * * scheduled run) is now JDK 25; the special-cased 0 6 * * * scheduled run
      now uses JDK 21.
    • Updated the schedule comments to match the new mapping.
  • Left unchanged on purpose: the runtime_jdk: 17 / 21 / 25 shade-run and Native Image
    matrix entries — those exercise specific runtime JDKs regardless of the primary build JDK,
    so they are not part of the swap.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial build/CI configuration change without dedicated test coverage; it is
exercised by the CI workflows themselves, which now build and test on JDK 25 by default.

Does this pull request potentially affect one of the following parts:

  • Anything that affects deployment

The official Pulsar Docker image is now built on JDK 25 by default (docker-jdk = "25").
This applies to the master / 5.0.0-M2 line only; the 5.0.0-M1 release (branch-5.0-M1)
continues to default to Java 21.

Make JDK 25 the default for the official Docker image (docker-jdk) and
the primary JDK in pulsar-ci / pulsar-ci-flaky, keeping JDK 21 as the
secondary scheduled run. The Java 25 default was agreed on dev@; 5.0.0-M1
(branch-5.0-M1) keeps Java 21, so this targets the master / 5.0.0-M2 line.

Assisted-by: Claude Code (Opus 4.8)
@lhotari lhotari added this to the 5.0.0-M2 milestone Jun 20, 2026
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.

1 participant