ZOOKEEPER-5039: Raise to min JDK 17, also build, test with JDK25#2376
ZOOKEEPER-5039: Raise to min JDK 17, also build, test with JDK25#2376PDavid wants to merge 11 commits into
Conversation
|
OK, Mockito 5 requires Java 11 or higher. It will not work with Java 8. Do we have to support Java 8 on ZooKeeper master branch? |
|
I think we can drop Java 8 support on the master branch. Please follow the discussion on the dev@ list. |
a72fee0 to
e413971
Compare
|
It seems only changing the Jenkins file did not worked out: https://ci-hadoop.apache.org/job/zookeeper-precommit-github-pr/job/PR-2376/5/console Wrote to ASF Slack builds channel if thy can install / configure JDK 17 / JDK 25 for us. |
Might be (just guessing) |
|
|
anmolnar
left a comment
There was a problem hiding this comment.
Lgtm. Please update and test Java version in dev/docker/Dockerfile as well.
Thanks!
| # | ||
|
|
||
| FROM maven:3.8.4-jdk-11 | ||
| FROM maven:3.9.6-eclipse-temurin-17 |
There was a problem hiding this comment.
Since the old jdk and openjdk tags are deprecated, we should use the newer vendor-specific tags. Use Eclipse Temurin since we already use it in our GH: Actions workflows.
Also update Maven to 3.9.6 - it includes several improvements.
anmolnar
left a comment
There was a problem hiding this comment.
lgtm.
@eolivelli @ctubbsii PTAL
|
-1 - the documentation needs to be updated. Things like https://zookeeper.apache.org/doc/current/zookeeperAdmin.html - but please review all the docs to ensure covered. Also the release notes (generated from JIRA) need to include this change, see : https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=135860428#HowToReleaseusingmavenreleaseplugin-Createreleasenotesonreleasebranch |
|
fwiw claude(sonnet) says: The single most impactful documentation edit is zookeeperAdmin.md line ~128 — that's the canonical "required software" statement users and operators reference. The pom.xml |
As of Mockito 5.x, the mockito-inline mock-maker became the default, so mockito-inline as a separate artifact is no longer needed.
- Upgraded spotbugs-maven-plugin to 4.9.3.0 and annotations to 4.9.3. - Overrode ASM to 9.9.1 in the plugin dependencies to support JDK 25 (class file version 69). - Added newly found bug patterns to excludeFindBugsFilter.xml - these are all pre-existing issues in the codebase that the newer SpotBugs detects but the old version couldn't.
to fix test issue: Caused by: io.github.toolfactory.jvm.util.ObjectProvider$BuildingException: Exception occurred while retrieving the implementation of class io.github.toolfactory.jvm.function.catalog.ConstructorInvokeFunction (jvm architecture: x64, jvm version: 25, jvm vendor: Eclipse Adoptium)
Exception message differs now a bit.
Also update Maven to 3.9.6 - it includes several improvements. Since the old `jdk` and `openjdk` tags are deprecated, we should use the newer vendor-specific tags. Use Eclipse Temurin since we already use it in our GH: Actions workflows.
- Replaced maven.compiler.source=17 + maven.compiler.target=17 with a single maven.compiler.release=17 - Removed maven.compiler.release property from m2e profile (it now inherits from main properties).
| <Bug pattern="EI_EXPOSE_REP"/> | ||
| <Bug pattern="EI_EXPOSE_REP2"/> | ||
| <Bug pattern="CT_CONSTRUCTOR_THROW"/> | ||
| <Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE"/> | ||
| <Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE"/> | ||
| <Bug pattern="AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE"/> | ||
| <Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/> | ||
| <Bug pattern="DCN_NULLPOINTER_EXCEPTION"/> | ||
| <Bug pattern="US_USELESS_SUPPRESSION_ON_METHOD"/> | ||
| <Bug pattern="US_USELESS_SUPPRESSION_ON_CLASS"/> | ||
| <Bug pattern="US_USELESS_SUPPRESSION_ON_FIELD"/> | ||
| <Bug pattern="DMI_RANDOM_USED_ONLY_ONCE"/> | ||
| <Bug pattern="SS_SHOULD_BE_STATIC"/> | ||
| <Bug pattern="NP_UNWRITTEN_FIELD"/> | ||
| <Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR"/> | ||
| <Bug pattern="MS_EXPOSE_REP"/> |
There was a problem hiding this comment.
Actually this suppression list are very broad. They are including real concurrency bugs (AT_STALE_THREAD_WRITE_OF_PRIMITIVE, AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE) and design issues (CT_CONSTRUCTOR_THROW, EI_EXPOSE_REP). Should we create a follow-up Jira to triage
and fix these incrementally?
Or should we suppress these by class so that these are not suppressed everywhere? We have 198 class/pattern combinations across these 16 patterns.
7671da3 to
36b3f83
Compare
maven.compiler.source+maven.compiler.targetwith a singlemaven.compiler.release=17maven.compiler.release propertyfromm2eprofile (it now inherits from main properties).jdk-release-flagMaven profile as it is not required anymore (maven.compiler.release=17makes sure our build is compatible with Java 17).