fabric8io / kubernetes-client

Java client for Kubernetes & OpenShift
http://fabric8.io
Apache License 2.0
3.39k stars 1.46k forks source link

Set Java baseline to 11 #6081

Open manusa opened 3 months ago

manusa commented 3 months ago

Description

Part of #5778

Starting from version 7.0.0, the Fabric8 Kubernetes Client will require at minimum Java 11 to work.

Tasks

andreaTP commented 3 months ago

Now that we are at it: https://www.oracle.com/java/technologies/java-se-support-roadmap.html

Java 11 is almost out of the support phase, would it make sense to bump directly to Java 17?

manusa commented 3 months ago

Now that we are at it: https://www.oracle.com/java/technologies/java-se-support-roadmap.html

Java 11 is almost out of the support phase, would it make sense to bump directly to Java 17?

Refer to https://github.com/fabric8io/kubernetes-client/issues/5778#issuecomment-2190468324

Most companies are going to provide commercial support for Java 11 well passed that date (just check the paid support column in your link).

The only reason I (personally) see to bump now is because it's becoming extremely difficult to maintain the project with such a low baseline, many of our dependencies have moved to Java 11. Other than that, there are no clear advantages of upgrading the baseline past 11 and on the other hand there many disadvantages to do so.

jorsol commented 3 months ago

Now that we are at it: https://www.oracle.com/java/technologies/java-se-support-roadmap.html Java 11 is almost out of the support phase, would it make sense to bump directly to Java 17?

Refer to #5778 (comment)

Most companies are going to provide commercial support for Java 11 well passed that date (just check the paid support column in your link).

This project should not be tied to companies that provide commercial support for Java 11... see my comment for a longer explanation: https://github.com/fabric8io/kubernetes-client/issues/5778#issuecomment-2191416898

But most importantly, if you check current ecosystem reports like the New Relic one, new Java versions are being adopted faster, is possible that Java 17 is more used than Java 11 right now... Spring 6 (Boot 3) and Quarkus 3.7 require Java 17 as the baseline, in other words, the ecosystem is starting to move faster.

The only reason I (personally) see to bump now is because it's becoming extremely difficult to maintain the project with such a low baseline, many of our dependencies have moved to Java 11. Other than that, there are no clear advantages of upgrading the baseline past 11 and on the other hand there many disadvantages to do so.

This is just my personal opinion, but I think there are more advantages of upgrading past 11 than disadvantages. There will be always trade-offs, so if you feel comfortable with Java 11 that's a good baseline too.

manusa commented 3 months ago

there are more advantages of upgrading past 11

Such as? (I'm referring specifically for this code-base and those advantages that would be impactful from a user's perspective)

jorsol commented 3 months ago

there are more advantages of upgrading past 11

Such as? (I'm referring specifically for this code-base and those advantages that would be impactful from a user's perspective)

Impactful from a user's perspective probably no, but advantages for the code-base maintainability could be, with Java 17 you have switch expression, text blocks, records, sealed classes, etc... all that would require some refactoring and the effort could not be worth it, but at least for new code or parts that can be refactored, there is an opportunity for that.

In any case, I don't mind keeping Java 11 as the baseline, I'm not a maintainer or even a casual contributor, and this discussion (that probably already happened) should be done with the team that maintains the project, so again, is just my personal preference, don't take it as advice or recommendation 😉 .

manusa commented 3 months ago

:) no worries

Impactful from a user's perspective probably no

I was just making sure that there wasn't anything else that could actually be interesting for users and that we missed out when weighing the pros/cons.

Personally, I need to keep multiple pet projects just to be able to test Java's new features :sweat_smile: Otherwise it's groundhog day in 2014 :sob:

stale[bot] commented 19 hours ago

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!