diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47bb2cbc31d5d..59c2fabaaed25 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -127,7 +127,7 @@ jobs: - name: Setup Gradle uses: ./.github/actions/setup-gradle with: - java-version: 24 + java-version: 17 gradle-cache-read-only: ${{ !inputs.is-trunk }} gradle-cache-write-only: ${{ inputs.is-trunk }} develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} @@ -181,7 +181,7 @@ jobs: fail-fast: false matrix: # If we change these, make sure to adjust ci-complete.yml - java: [ 24, 17 ] + java: [ 25, 17 ] run-flaky: [ true, false ] run-new: [ true, false ] exclude: @@ -270,7 +270,7 @@ jobs: python .github/scripts/junit.py \ --path build/junit-xml >> $GITHUB_STEP_SUMMARY - # This job downloads all the JUnit XML files and thread dumps from the JDK 24 test runs. + # This job downloads all the JUnit XML files and thread dumps from the JDK 25 test runs. # If any test job fails, we will not run this job. Also, if any thread dump artifacts # are present, this means there was a timeout in the tests and so we will not proceed # with catalog creation. @@ -288,7 +288,7 @@ jobs: - name: Download Thread Dumps uses: actions/download-artifact@v5 with: - pattern: junit-thread-dumps-24-* + pattern: junit-thread-dumps-25-* path: thread-dumps merge-multiple: true - name: Check For Thread Dump @@ -302,7 +302,7 @@ jobs: - name: Download JUnit XMLs uses: actions/download-artifact@v5 with: - pattern: junit-xml-24-* # Only look at JDK 24 tests for the test catalog + pattern: junit-xml-25-* # Only look at JDK 25 tests for the test catalog path: junit-xml merge-multiple: true - name: Collate Test Catalog diff --git a/.github/workflows/ci-complete.yml b/.github/workflows/ci-complete.yml index 6b8492fb7c0ab..9d7544b81ff59 100644 --- a/.github/workflows/ci-complete.yml +++ b/.github/workflows/ci-complete.yml @@ -43,8 +43,8 @@ jobs: strategy: fail-fast: false matrix: - # Make sure these match build.yml - java: [ 24, 17 ] + # Make sure these match build.yml and also keep in mind that GitHub Actions build will always use this file from the trunk branch. + java: [ 25, 17 ] run-flaky: [ true, false ] run-new: [ true, false ] exclude: diff --git a/LICENSE-binary b/LICENSE-binary index c6078a48bca75..91c8865931ea2 100644 --- a/LICENSE-binary +++ b/LICENSE-binary @@ -248,9 +248,9 @@ License Version 2.0: - opentelemetry-proto-1.3.2-alpha - plexus-utils-3.5.1 - rocksdbjni-10.1.3 -- scala-library-2.13.16 +- scala-library-2.13.17 - scala-logging_2.13-3.9.5 -- scala-reflect-2.13.16 +- scala-reflect-2.13.17 - snappy-java-1.1.10.7 - snakeyaml-2.4 - swagger-annotations-2.2.25 diff --git a/README.md b/README.md index 06c0e3921ebc1..95386750a9315 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ You need to have [Java](http://www.oracle.com/technetwork/java/javase/downloads/index.html) installed. -We build and test Apache Kafka with 17 and 24. The `release` parameter in javac is set to `11` for the clients +We build and test Apache Kafka with 17 and 25. The `release` parameter in javac is set to `11` for the clients and streams modules, and `17` for the rest, ensuring compatibility with their respective minimum Java versions. Similarly, the `release` parameter in scalac is set to `11` for the streams modules and `17` for the rest. diff --git a/bin/kafka-run-class.sh b/bin/kafka-run-class.sh index 0a5ecfae04e20..012f9c27f0aca 100755 --- a/bin/kafka-run-class.sh +++ b/bin/kafka-run-class.sh @@ -49,7 +49,7 @@ should_include_file() { base_dir=$(dirname $0)/.. if [ -z "$SCALA_VERSION" ]; then - SCALA_VERSION=2.13.16 + SCALA_VERSION=2.13.17 if [[ -f "$base_dir/gradle.properties" ]]; then SCALA_VERSION=`grep "^scalaVersion=" "$base_dir/gradle.properties" | cut -d= -f 2` fi diff --git a/bin/windows/kafka-run-class.bat b/bin/windows/kafka-run-class.bat index a73ae2b26f2d7..394269a4294e2 100755 --- a/bin/windows/kafka-run-class.bat +++ b/bin/windows/kafka-run-class.bat @@ -27,7 +27,7 @@ set BASE_DIR=%CD% popd IF ["%SCALA_VERSION%"] EQU [""] ( - set SCALA_VERSION=2.13.16 + set SCALA_VERSION=2.13.17 ) IF ["%SCALA_BINARY_VERSION%"] EQU [""] ( diff --git a/build.gradle b/build.gradle index 1b4444b960813..39ed7e0420683 100644 --- a/build.gradle +++ b/build.gradle @@ -71,6 +71,13 @@ ext { "--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED" ) + if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_25)) { + // Spotbugs is not compatible with Java 25+ so Gradle related tasks are disabled + // until version can be upgraded: https://github.com/spotbugs/spotbugs/issues/3564 + project.gradle.startParameter.excludedTaskNames.add("spotbugsMain") + project.gradle.startParameter.excludedTaskNames.add("spotbugsTest") + } + maxTestForks = project.hasProperty('maxParallelForks') ? maxParallelForks.toInteger() : Runtime.runtime.availableProcessors() maxScalacThreads = project.hasProperty('maxScalacThreads') ? maxScalacThreads.toInteger() : Math.min(Runtime.runtime.availableProcessors(), 8) diff --git a/clients/src/test/java/org/apache/kafka/test/TestSslUtils.java b/clients/src/test/java/org/apache/kafka/test/TestSslUtils.java index 889ebcbc607b8..7b4680a8b0446 100644 --- a/clients/src/test/java/org/apache/kafka/test/TestSslUtils.java +++ b/clients/src/test/java/org/apache/kafka/test/TestSslUtils.java @@ -110,7 +110,7 @@ public class TestSslUtils { * @param dn the X.509 Distinguished Name, eg "CN=Test, L=London, C=GB" * @param pair the KeyPair * @param days how many days from now the Certificate is valid for, or - for negative values - how many days before now - * @param algorithm the signing algorithm, eg "SHA1withRSA" + * @param algorithm the signing algorithm, eg "SHA256withRSA" * @return the self-signed certificate * @throws CertificateException thrown if a security error or an IO error occurred. */ @@ -131,7 +131,7 @@ public static X509Certificate generateCertificate(String dn, KeyPair pair, * CA. * @param parentKeyPair The key pair of the issuer. Leave null if you want to generate a root * CA. - * @param algorithm the signing algorithm, eg "SHA1withRSA" + * @param algorithm the signing algorithm, eg "SHA256withRSA" * @return the signed certificate * @throws CertificateException */ @@ -399,7 +399,7 @@ public static class CertificateBuilder { private byte[] subjectAltName; public CertificateBuilder() { - this(30, "SHA1withRSA"); + this(30, "SHA256withRSA"); } public CertificateBuilder(int days, String algorithm) { diff --git a/gradle.properties b/gradle.properties index 8855ff8362314..3a669bb57a3cf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,7 +24,7 @@ group=org.apache.kafka # - streams/quickstart/java/src/main/resources/archetype-resources/pom.xml # - streams/quickstart/java/pom.xml version=4.2.0-SNAPSHOT -scalaVersion=2.13.16 +scalaVersion=2.13.17 # Adding swaggerVersion in gradle.properties to have a single version in place for swagger swaggerVersion=2.2.25 task=build diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 9b1a42e53494a..b85dc87d78fac 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -23,7 +23,7 @@ ext { } // Add Scala version -def defaultScala213Version = '2.13.16' +def defaultScala213Version = '2.13.17' if (hasProperty('scalaVersion')) { if (scalaVersion == '2.13') { versions["scala"] = defaultScala213Version @@ -110,7 +110,7 @@ versions += [ lz4: "1.8.0", mavenArtifact: "3.9.6", metrics: "2.2.0", - mockito: "5.14.2", + mockito: "5.20.0", opentelemetryProto: "1.3.2-alpha", protobuf: "3.25.5", // a dependency of opentelemetryProto pcollections: "4.0.2", @@ -125,7 +125,7 @@ versions += [ snappy: "1.1.10.7", spotbugs: "4.9.4", mockOAuth2Server: "2.2.1", - zinc: "1.10.8", + zinc: "1.11.0", // When updating the zstd version, please do as well in docker/native/native-image-configs/resource-config.json // Also make sure the compression levels in org.apache.kafka.common.record.CompressionType are still valid zstd: "1.5.6-10",