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 Java 17 or Java 21 for building Bookkeeper #4446

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Jun 24, 2024

Motivation

There doesn't seem to be a need to retain support for Java 8 and Java 11 in new releases of Bookkeeper.
Java 11 is EOL in October.
Please see mailing list discussion https://lists.apache.org/thread/gtp4j5y9txzlz0pfgfhy3gz4q4ptnlo8

Changes

  • Enforce Java 17 or Java 21 for building Bookkeeper
  • Set <release>17</release> for maven-compiler-plugin by default
    • keep Java 8 compatibility in cpu-affinity and circe-checksum since Pulsar's Java client uses them.
  • Replace Java 11 usage with Java 17 in CI
  • Remove CI jobs using Java 8 or Java 11

@lhotari lhotari added this to the 4.18.0 milestone Jun 24, 2024
@lhotari lhotari self-assigned this Jun 24, 2024
@lhotari lhotari mentioned this pull request Jun 24, 2024
@dlg99
Copy link
Contributor

dlg99 commented Jun 24, 2024

I think we should first refactor BK client into a separate module that will be built with JDK 8, then we can move BK server to JDK 17

#617

@lhotari
Copy link
Member Author

lhotari commented Jun 24, 2024

I think we should first refactor BK client into a separate module that will be built with JDK 8, then we can move BK server to JDK 17

#617

Refactoring BK client into a separate module isn't a trivial task.
Who really cares about Java 8 for the Bookkeeper client? Java 8 has been end-of-life for a long time. Why should we care about supporting it if nobody needs it?

@shoothzj
Copy link
Member

@lhotari As far as I know, Pravega uses BookKeeper and their minimum jdk is jdk11.
IMHO, even we decide to require jdk17 for BookKeeper client, we need to prepare a mjor version update.

@lhotari
Copy link
Member Author

lhotari commented Jun 26, 2024

@lhotari As far as I know, Pravega uses BookKeeper and their minimum jdk is jdk11.
IMHO, even we decide to require jdk17 for BookKeeper client, we need to prepare a mjor version update.

@shoothzj they won't be staying on jdk11 forever. Java 11 is EOL very soon. Current maintenance branches will be maintained for some time. It doesn't mean that we cut support for Java 8 or Java 11 when we decide to switch to Java 17 in the master branch.

@XuQianJin-Stars
Copy link

I think upgrading to jdk17 or jdk21 would be more mainstream.

@nodece
Copy link
Member

nodece commented Jul 1, 2024

Maintaining compatibility with lower versions of Java is a good idea, but more and more libraries are constantly upgrading Java versions, which also forces us to force upgrades.

Using Java 17 or 21 is a goo idea, +1.

I think we should first refactor BK client into a separate module that will be built with JDK 8, then we can move BK server to JDK 17

It seems that we need to do that first.

@liangyuanpeng
Copy link

I think we should first refactor BK client into a separate module that will be built with JDK 8, then we can move BK server to JDK 17

My two cents
working for java11 and not java8 if we want to refactor BK client into a separate module,java8 is becoming a liability.

@lhotari
Copy link
Member Author

lhotari commented Sep 2, 2024

I think we should first refactor BK client into a separate module that will be built with JDK 8, then we can move BK server to JDK 17

My two cents working for java11 and not java8 if we want to refactor BK client into a separate module,java8 is becoming a liability.

There's also maintenance branches with Java 8 support, I don't see a point keeping support for JDK 8 in the future versions of Bookkeeper. Existing Java 8 users can continue to use maintenance branches until they have migrated to newer JDK versions. I think that master branch should set the minimum JDK version to either Java 17 or Java 21 and leave the previous JDK versions to be handled by maintenance branches.

Can we even find a single BK users that runs a recent BK version on Java 8? It's definitely a completely unnecessary liability to keep supporting Java 8 in the master branch and future BK versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants