Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
88cd989
ZOOKEEPER-5039: Upgrade Mockito to 5.23.0 for JDK25
PDavid Apr 23, 2026
077fbdd
ZOOKEEPER-5039: Switch GH: Action workflows to JDK 17 and 25
PDavid May 4, 2026
e0684de
ZOOKEEPER-5039: Switch Jenkins workflows to JDK 17 and 25
PDavid May 4, 2026
a07e58e
ZOOKEEPER-5039: Upgrade spotbugs to support JDK 17
PDavid May 4, 2026
3c3df59
ZOOKEEPER-5039: Upgrade spotbugs to support Java 25
PDavid May 7, 2026
0a74e3b
ZOOKEEPER-5039: Upgrade burningwave mockdns to 0.27.2 for JDK25
PDavid Apr 24, 2026
9a95d36
ZOOKEEPER-5039: Fix PrometheusMetricsProviderConfigTest
PDavid May 7, 2026
9cad6d5
ZOOKEEPER-5039: Upgrade zookeeper/dev Docker image to JDK 17
PDavid May 8, 2026
58762dd
ZOOKEEPER-5039: Change Maven compiler source and target to 17
PDavid May 21, 2026
891909c
ZOOKEEPER-5039: Align Maven compiler Java versions
PDavid May 21, 2026
a6dff1e
ZOOKEEPER-5039: Update documentation
PDavid May 21, 2026
6a61f35
ZOOKEEPER-5039: Use Maven 3.8.8 in Dockerfile
PDavid Jun 16, 2026
56f47a7
ZOOKEEPER-5039: Fix SpotBugs VO_VOLATILE_INCREMENT in JvmPauseMonitor
PDavid Jun 17, 2026
859ba6f
ZOOKEEPER-5039: Install gnugpg in dev/docker/Dockerfile
PDavid Jun 22, 2026
e49e12c
ZOOKEEPER-5039: Added a small README for dev/docker/Dockerfile
PDavid Jun 22, 2026
21a1c02
ZOOKEEPER-5039: Update Java version related documentation
PDavid Jun 22, 2026
ccb70d7
ZOOKEEPER-5039: Add Maven enforcer rules for minimum Java and Maven v…
PDavid Jun 23, 2026
53e4717
ZOOKEEPER-5039: Use Java 25 in website GH Actions workflow
PDavid Jun 23, 2026
3958476
ZOOKEEPER-5039: Use newer ZooKeeper versions in "End to End Tests" GH…
PDavid Jun 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ jobs:
strategy:
matrix:
profile:
- name: 'full-build-jdk8'
jdk: 8
- name: 'full-build-jdk17'
jdk: 17
args: '-Pfull-build apache-rat:check verify -DskipTests spotbugs:check checkstyle:check'
- name: 'full-build-jdk11'
jdk: 11
- name: 'full-build-jdk25'
jdk: 25
args: '-Pfull-build apache-rat:check verify -DskipTests spotbugs:check checkstyle:check'
- name: 'full-build-java-tests'
jdk: 11
jdk: 25
args: '-Pfull-build verify -Dsurefire-forkcount=1 -DskipCppUnit -Dsurefire.rerunFailingTestsCount=5'
- name: 'full-build-cppunit-tests'
jdk: 11
jdk: 25
args: '-Pfull-build verify -Dtest=_ -DfailIfNoTests=false'
fail-fast: false
timeout-minutes: 360
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
compatibility:
strategy:
matrix:
jdk: [8, 11]
zk: [3.5.9, 3.6.3, 3.7.0, nightly]
jdk: [17, 25]
zk: [3.7.2, 3.8.6, 3.9.5, nightly]
fail-fast: false
timeout-minutes: 360
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.buildRef }}
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: 11
java-version: 17
distribution: temurin
cache: 'maven'
- name: Show the first log message
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up JDK 11
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: 11
java-version: 25
distribution: temurin
cache: 'maven'
- name: Set up Node.js 22
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pipeline {
axes {
axis {
name 'JAVA_VERSION'
values 'jdk_1.8_latest', 'jdk_11_latest'
values 'jdk_17_latest', 'jdk_25_latest'
}
}

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile-PreCommit
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pipeline {

tools {
maven "maven_latest"
jdk "jdk_1.8_latest"
jdk "jdk_17_latest"
}

stages {
Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p align="left">
<a href="https://zookeeper.apache.org/">
<img src="https://zookeeper.apache.org/images/zookeeper_small.gif"" alt="https://zookeeper.apache.org/"><br/>
<img src="https://zookeeper.apache.org/images/zookeeper_small.gif" alt="https://zookeeper.apache.org/"><br/>
</a>
</p>

Expand Down Expand Up @@ -39,11 +39,6 @@ is voted on and approved by the Apache ZooKeeper PMC:

https://repo1.maven.org/maven2/org/apache/zookeeper/zookeeper

## Java 8

If you are going to compile with Java 1.8, you should use a
recent release at u211 or above.

# Contributing
We always welcome new contributors to the project! See [How to Contribute](https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute) for details on how to submit patches as pull requests and other aspects of our contribution workflow.

Expand Down
5 changes: 3 additions & 2 deletions dev/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#

FROM maven:3.8.4-jdk-11
FROM maven:3.8.8-eclipse-temurin-17
Comment thread
PDavid marked this conversation as resolved.

RUN apt-get update
RUN apt-get install -y \
Expand All @@ -31,4 +31,5 @@ RUN apt-get install -y \
libssl-dev \
libsasl2-modules-gssapi-mit \
libsasl2-modules \
libsasl2-dev
libsasl2-dev \
gnupg
3 changes: 3 additions & 0 deletions dev/docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# About

Just run `dev/docker/run.sh` and you will have a Linux environment with all that is needed to build ZooKeeper, even on MacOs.
18 changes: 18 additions & 0 deletions excludeFindBugsFilter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,23 @@
<!-- this problem is to be addressed in ZOOKEEPER-3227 -->
<Bug pattern="DM_DEFAULT_ENCODING"/>

<!-- newly detected by SpotBugs 4.9.3; pre-existing code, not regressions -->
<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"/>
Comment on lines +11 to +26

@PDavid PDavid May 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.


</FindBugsFilter>

92 changes: 68 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,6 @@
<name>m2e.version</name>
</property>
</activation>
<properties>
<maven.compiler.release>8</maven.compiler.release>
</properties>
<build>
<pluginManagement>
<plugins>
Expand Down Expand Up @@ -436,15 +433,6 @@
</pluginManagement>
</build>
</profile>
<profile>
<id>jdk-release-flag</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<maven.compiler.release>8</maven.compiler.release>
</properties>
</profile>
<profile>
<id>clover</id>
<activation>
Expand Down Expand Up @@ -540,8 +528,7 @@

<properties>
<!-- maven properties -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.release>17</maven.compiler.release>
<project.build.outputTimestamp>1691130453</project.build.outputTimestamp>
<dependency.locations.enabled>false</dependency.locations.enabled>
<surefire.version>2.22.1</surefire.version>
Expand All @@ -556,7 +543,7 @@
<jmockit.version>1.48</jmockit.version>
<junit.version>5.6.2</junit.version>
<junit-platform.version>1.6.2</junit-platform.version>
<mockito.version>4.9.0</mockito.version>
<mockito.version>5.23.0</mockito.version>
<hamcrest.version>2.2</hamcrest.version>
<commons-cli.version>1.5.0</commons-cli.version>
<netty.version>4.1.130.Final</netty.version>
Expand All @@ -568,14 +555,16 @@
<bouncycastle.version>1.78</bouncycastle.version>
<commons-collections.version>4.4</commons-collections.version>
<dropwizard.version>4.1.12.1</dropwizard.version>
<spotbugsannotations.version>4.0.2</spotbugsannotations.version>
<spotbugsannotations.version>4.9.3</spotbugsannotations.version>
<checkstyle.version>8.39</checkstyle.version>
<enforcer.version>3.0.0-M3</enforcer.version>
<commons-io.version>2.17.0</commons-io.version>
<burningwave.mockdns.version>0.25.4</burningwave.mockdns.version>
<burningwave.mockdns.version>0.27.2</burningwave.mockdns.version>
<dnsjava.version>3.5.1</dnsjava.version>
<clover-maven-plugin.version>4.4.1</clover-maven-plugin.version>
<sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
<maven.min.version>3.5.0</maven.min.version>
<java.min.version>${maven.compiler.release}</java.min.version>

<!-- parameters to pass to C client build -->
<c-client-openssl>yes</c-client-openssl>
Expand Down Expand Up @@ -704,12 +693,6 @@
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
Expand Down Expand Up @@ -887,10 +870,39 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.0.0</version>
<version>4.9.3.0</version>
<configuration>
<excludeFilterFile>excludeFindBugsFilter.xml</excludeFilterFile>
</configuration>
<dependencies>
<!-- Override ASM version to support JDK 25 (class file version 69)
TODO: Remove this override when future SpotBugs version bundles ASM 9.9+ -->
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.9.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-analysis</artifactId>
<version>9.9.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>9.9.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<version>9.9.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-util</artifactId>
<version>9.9.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
Expand Down Expand Up @@ -1157,6 +1169,38 @@
<artifactId>maven-enforcer-plugin</artifactId>
<version>${enforcer.version}</version>
<executions>
<execution>
<id>display-info</id>
<goals>
<goal>display-info</goal>
</goals>
<phase>initialize</phase>
<inherited>false</inherited>
</execution>
<execution>
<id>zookeeper-min-maven-min-java</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[${maven.min.version},)</version>
<message>Maven is out of date.
ZooKeeper requires at least version ${maven.min.version} of Maven to properly build from source.
You appear to be using an older version. You can use either "mvn -version" or
"mvn enforcer:display-info" to verify what version is active.</message>
</requireMavenVersion>
<requireJavaVersion>
<version>[${java.min.version},)</version>
<message>Java is out of date.
ZooKeeper requires at least version ${java.min.version} of the JDK to properly build from source.
You appear to be using an older version. You can use either "mvn -version" or
"mvn enforcer:display-info" to verify what version is active.</message>
</requireJavaVersion>
</rules>
</configuration>
</execution>
<execution>
<id>banned-commons-lang</id>
<goals>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.FileInputStream;
import java.io.IOException;
import java.security.KeyStore;
Expand Down Expand Up @@ -107,8 +108,10 @@ public void testInvalidAddr() throws MetricsProviderLifeCycleException {
assertThrows(MetricsProviderLifeCycleException.class, provider::start);

assertEquals("Failed to start Prometheus Jetty server", exception.getMessage());
assertNotNull(exception.getCause());
assertEquals("Failed to bind to master:0", exception.getCause().getMessage());
Throwable cause = exception.getCause();
assertNotNull(cause);
assertTrue(cause.getMessage().contains("Failed to bind to master"));
assertTrue(cause.getMessage().contains(":0"));
}

@Test
Expand Down
5 changes: 0 additions & 5 deletions zookeeper-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,6 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
Expand Down
Loading
Loading