Skip to content

Conversation

@dejan2609
Copy link
Contributor

@dejan2609 dejan2609 commented Sep 19, 2025

This patch updates the Apache Kafka project's build, test, and
dependency configurations.

  • Java Version Update: The build and test processes have been upgraded
    from Java 24 to Java 25.
  • Scala Version Update: The Scala library version has been updated from
    2.13.16 to 2.13.17.
  • Dependency Upgrades: Several dependencies have been updated to newer
    versions, including mockito (5.14.2 to 5.20.0), zinc (1.10.8 to 1.11.0),
    and scala-library/reflect (2.13.16 to 2.13.17).
  • Code and Configuration Changes: The patch modifies build.gradle to
    exclude certain Spotbugs tasks for Java 25 compatibility. It also
    changes the default signing algorithm in TestSslUtils.java from
    SHA1withRSA to SHA256withRSA, enhancing security.
  • Documentation: The README.md file has been updated to reflect the new
    Java 25 requirement.

Reviewers: Ismael Juma ismael@juma.me.uk, Liam Clarke-Hutchinson
liam@steelsky.co.nz, Gaurav Narula gaurav_narula2@apple.com,
Chia-Ping Tsai chia7712@gmail.com

@github-actions github-actions bot added triage PRs from the community build Gradle build or GitHub Actions labels Sep 19, 2025
@dejan2609
Copy link
Contributor Author

Thank you @brandboat 👌

@dejan2609 dejan2609 marked this pull request as draft September 23, 2025 15:18
@github-actions github-actions bot removed the triage PRs from the community label Sep 24, 2025
@dejan2609
Copy link
Contributor Author

It seems that Github Actions now supports Java 25 build; let's test that.

@dejan2609 dejan2609 marked this pull request as ready for review September 24, 2025 10:51
@dejan2609
Copy link
Contributor Author

Lots of test are failing when tested against Java 25:

 Gradle task had a failure exit code. Failing this script.
25373 tests cases run in 1h18m49s.

17471 PASSED ✅, 5676 FAILED ❌, 0 FLAKY ⚠️ , 0 SKIPPED 🙈, 0 QUARANTINED 😷, and 0 errors.
Error: Process completed with exit code 1.
Error: $GITHUB_STEP_SUMMARY upload aborted, supports content up to a size of 1024k, got 6105k. For more information see: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary

@dejan2609
Copy link
Contributor Author

And also: some references to Java 24 are still present.

@dejan2609 dejan2609 marked this pull request as draft September 24, 2025 17:28
@srdo
Copy link
Contributor

srdo commented Sep 24, 2025

@dejan2609 The references to Java 24 are likely due to #20295 (comment)

It might make sense to add a comment to ci-complete.yml, so the next person to come across this doesn't have to figure that out again :)

@dejan2609
Copy link
Contributor Author

Much obliged @srdo !

I was this close from digging into all related commits/PR's to figure out what is going on:
image

Yes, it does make sense to add a small comment, I will do that for sure 🤝

@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Sep 30, 2025
@dejan2609
Copy link
Contributor Author

Update: Mockito version is upgraded in order to resolve build issues; see the output error for ./gradlew test:

org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.createMock(InlineByteBuddyMockMaker.java:56)
                at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:99)
                at org.mockito.internal.MockitoCore.mock(MockitoCore.java:84)
                at org.mockito.Mockito.mock(Mockito.java:2162)
                at org.mockito.Mockito.mock(Mockito.java:2077)
                ... 1 more

                Caused by:
                java.lang.IllegalArgumentException: Java 25 (69) is not supported by the current version of Byte Buddy which officially supports Java 24 (68) - update Byte Buddy or set net.bytebuddy.experimental as a VM property
                    at net.bytebuddy.utility.OpenedClassReader.of(OpenedClassReader.java:120)

Related links:

@dejan2609
Copy link
Contributor Author

dejan2609 commented Sep 30, 2025

With latest Mockito version test results are looking much better:

image

More details:

  • 7 out of 8 tests fail with this error:
        org.opentest4j.AssertionFailedError: Channel 0 was not ready after 30 seconds ==> expected: <true> but was: <false>
	at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at app//org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
	at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
	at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:214)
	at app//org.apache.kafka.common.network.NetworkTestUtils.waitForChannelReady(NetworkTestUtils.java:107)
	at app//org.apache.kafka.common.network.NetworkTestUtils.checkClientConnection(NetworkTestUtils.java:70)
	at app//org.apache.kafka.common.network.SslTransportLayerTest.verifySslConfigs(SslTransportLayerTest.java:1327)
	at app//org.apache.kafka.common.network.SslTransportLayerTest.testClientAuthenticationRequiredValidProvided(SslTransportLayerTest.java:355)
	at java.base@25/java.lang.reflect.Method.invoke(Method.java:565)
	at java.base@25/java.util.Optional.ifPresent(Optional.java:178)
	at java.base@25/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:186)
  • one test failed like this:
	org.apache.kafka.common.config.ConfigException: Invalid value javax.net.ssl.SSLHandshakeException: (handshake_failure) Empty client certificate chain for configuration A client SSLEngine created with the provided settings can't connect to a server SSLEngine created with those settings.
	at app//org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:105)
	at app//org.apache.kafka.common.network.SslChannelBuilder.configure(SslChannelBuilder.java:70)
	at app//org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:188)
	at app//org.apache.kafka.common.network.ChannelBuilders.serverChannelBuilder(ChannelBuilders.java:105)
	at app//org.apache.kafka.common.network.SslTransportLayerTest.testInterBrokerSslConfigValidation(SslTransportLayerTest.java:1022)
	at java.base@25/java.lang.reflect.Method.invoke(Method.java:565)
	at java.base@25/java.util.Optional.ifPresent(Optional.java:178)
	at java.base@25/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:186)

@dejan2609
Copy link
Contributor Author

Small update:

  • Gradle version upgrade (8.14.3 -->> 9.1.0) will hopefully end up in trunk in the next few days
  • It seems that Apache commons-bcel will release Java 25 compatible version soon enough - this is important for us because SpotBugs Java 25 compatible versions will follow immediately

@chia7712
Copy link
Member

chia7712 commented Oct 7, 2025

@dejan2609 please rebase this PR, thanks!

notes:
 - spotbugs related Gradle tasks are temporarily disabled for Java 25 (see https://issues.apache.org/jira/browse/BCEL-377)
 - zinc upgrade: 1.10.8 -->> 1.11.0 (Java 25 compatibility): https://github.com/sbt/zinc/releases/tag/v1.11.0
 - Scala version patch update: 2.13.16 -->> 2.13.17 https://contributors.scala-lang.org/t/scala-2-13-17-release-planning/6994/17
 - GitHub Action now supports Java 25
 - mockito version upgrade: 5.14.2 -->> 5.20.0 (in order to resolve test issues)
   - https://issues.apache.org/jira/browse/SOLR-17718
   - https://github.com/mockito/mockito/releases/tag/v5.20.0
@dejan2609 dejan2609 marked this pull request as ready for review October 7, 2025 12:23
@github-actions github-actions bot added the small Small PRs label Oct 7, 2025
@dejan2609
Copy link
Contributor Author

@chia7712 Done, PR is rebased 🔁

Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

@dejan2609 thanks for this patch.

java: [ 24, 17 ]
# Make sure these match build.yml and also keep in mind that Java version change in PR is not honored by CI
# (i.e. GitHub actions build will always use trunk branch version)
java: [ 25, 17 ]
Copy link
Member

Choose a reason for hiding this comment

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

This will be a issue to other active branches. I open https://issues.apache.org/jira/browse/KAFKA-19768 to fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is a good idea.

I see that @mingyen066 already took this JIRA ticket, so I can be around and maybe provide some non-binding review 💡

@dejan2609
Copy link
Contributor Author

⚠️ I created a JIRA ticket for a few broken tests: KAFKA-19769 and invited someone to help us (via dev email list).

@gaurav-narula
Copy link
Contributor

gaurav-narula commented Oct 7, 2025

⚠️ I created a JIRA ticket for a few broken tests: KAFKA-19769 and invited someone to help us (via dev email list).

Thanks for the PR @dejan2609 . Can you try updating the signature algorithm as I suggested in the JIRA please? Hopefully that should unblock you 🤞

Edit: for posterity, here's the relevant commit in OpenJDK25: openjdk/jdk25u@dfa79c3

@dejan2609
Copy link
Contributor Author

Update:

  • tests results are fine ✅
  • we could wait a few days for a Java 25 compatible Apache commons-bcel version (and for the SpotBugs Java 25 compatible version that will follow immediately)

@chia7712 chia7712 merged commit ede6c90 into apache:trunk Oct 8, 2025
22 of 25 checks passed
@dejan2609
Copy link
Contributor Author

Thank you for the merge @chia7712 !
I will create a follow-up minor PR once the Spotbugs team manages to deliver a Java 25-compatible version.

@dejan2609 dejan2609 deleted the KAFKA-19664 branch October 8, 2025 08:31
@chia7712
Copy link
Member

chia7712 commented Oct 8, 2025

@dejan2609 thanks for your contribution

I will create a follow-up minor PR once the Spotbugs team manages to deliver a Java 25-compatible version.

it would be helpful to have a jira

@dejan2609
Copy link
Contributor Author

it would be helpful to have a jira

@chia7712 Here it is: ➡️ KAFKA-19771

@omkreddy
Copy link
Contributor

@dejan2609 @chia7712 Just checking — is the plan to use JDK 25 in the release scripts as well, so that it will be used for the upcoming 4.2 release?

@chia7712
Copy link
Member

Just checking — is the plan to use JDK 25 in the release scripts as well, so that it will be used for the upcoming 4.2 release?

That's a good point. I'll file a patch to address it and also add a comment about using the latest LTS when updating the JDK for CI.

@apalan60
Copy link
Contributor

Just checking — is the plan to use JDK 25 in the release scripts as well, so that it will be used for the upcoming 4.2 release?

That's a good point. I'll file a patch to address it and also add a comment about using the latest LTS when updating the JDK for CI.

Thanks for the discussion!
I’ve opened a PR to update the release scripts to use JDK 25: #20699
Let me know if any further changes are needed. I’ll update ASAP.

chia7712 pushed a commit that referenced this pull request Oct 19, 2025
…on Java 25 (#20704)

Prologue:
- #20561 (comment)
___

Related JIRA ticket: KAFKA-19771

details:

- spotbugs: 4.9.4 -->> 4.9.8
- spotbugs gradle plugin: 6.2.5 -->> 6.4.4
- spotbugs tasks are enabled for Java 25

related links:
-

https://github.com/spotbugs/spotbugs/blob/4.9.8/CHANGELOG.md#498---2025-10-18
- https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/6.4.4

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
chia7712 pushed a commit that referenced this pull request Oct 22, 2025
Related

discussion:#20561 (comment)

This PR primarily upgrades release tooling to JDK 25,  and includes  two
fixes identified while dry-running `release.py` locally.

1. JDK upgrade:  Switches `release.py` to run under JDK 25.

2. Pre‑req check false negative in git clean‑state verification task

* When running `release.py` with a clean working tree, the script
incorrectly failed the pre‑requisite check.

```bash
$ git status
On branch MINOR-1014
nothing to commit, working tree clean

$ python release.py
...
FAILURE: Pre-requisite not met: Verifying that you have no unstaged git
changes.
```
* Root cause: the checks used `has_unstaged_changes()` /
`has_staged_changes()` in a way that treated success as “has changes”.
The fix inverts the logic to assert **no** changes.

3. Gradle 9 aggregatedJavadoc failure

* With **Gradle 9**, `aggregatedJavadoc` currently fails in parallel
mode.
```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':aggregatedJavadoc'.
> Resolution of the configuration ':connect:compileClasspath' was
attempted without an exclusive lock. This is unsafe and not allowed.
```
* The change adds `--no-parallel` for the aggregated Javadoc step to
avoid build failures (discussion:
#19513 (comment))

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Ming-Yen Chung
 <mingyen066@gmail.com>, kuoche1712003 <kuoche1712003@gmail.com>,
 Chia-Ping Tsai <chia7712@gmail.com>
joshua2519 pushed a commit to joshua2519/kafka that referenced this pull request Oct 27, 2025
Related

discussion:apache#20561 (comment)

This PR primarily upgrades release tooling to JDK 25,  and includes  two
fixes identified while dry-running `release.py` locally.

1. JDK upgrade:  Switches `release.py` to run under JDK 25.

2. Pre‑req check false negative in git clean‑state verification task

* When running `release.py` with a clean working tree, the script
incorrectly failed the pre‑requisite check.

```bash
$ git status
On branch MINOR-1014
nothing to commit, working tree clean

$ python release.py
...
FAILURE: Pre-requisite not met: Verifying that you have no unstaged git
changes.
```
* Root cause: the checks used `has_unstaged_changes()` /
`has_staged_changes()` in a way that treated success as “has changes”.
The fix inverts the logic to assert **no** changes.

3. Gradle 9 aggregatedJavadoc failure

* With **Gradle 9**, `aggregatedJavadoc` currently fails in parallel
mode.
```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':aggregatedJavadoc'.
> Resolution of the configuration ':connect:compileClasspath' was
attempted without an exclusive lock. This is unsafe and not allowed.
```
* The change adds `--no-parallel` for the aggregated Javadoc step to
avoid build failures (discussion:
apache#19513 (comment))

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Ming-Yen Chung
 <mingyen066@gmail.com>, kuoche1712003 <kuoche1712003@gmail.com>,
 Chia-Ping Tsai <chia7712@gmail.com>
eduwercamacaro pushed a commit to littlehorse-enterprises/kafka that referenced this pull request Nov 12, 2025
This patch updates the Apache Kafka project's build, test, and
dependency configurations.

- Java Version Update: The build and test processes have been upgraded
from Java 24 to Java 25.
- Scala Version Update: The Scala library version has been updated from
2.13.16 to 2.13.17.
-  Dependency Upgrades: Several dependencies have been updated to newer
versions, including mockito (5.14.2 to 5.20.0), zinc (1.10.8 to 1.11.0),
and scala-library/reflect (2.13.16 to 2.13.17).
- Code and Configuration Changes: The patch modifies build.gradle to
exclude certain Spotbugs tasks for Java 25 compatibility. It also
changes the default signing algorithm in TestSslUtils.java from
SHA1withRSA to SHA256withRSA, enhancing security.
- Documentation: The README.md file has been updated to reflect the new
Java 25 requirement.

Reviewers: Ismael Juma <ismael@juma.me.uk>, Liam Clarke-Hutchinson
 <liam@steelsky.co.nz>, Gaurav Narula <gaurav_narula2@apple.com>,
 Chia-Ping Tsai <chia7712@gmail.com>
eduwercamacaro pushed a commit to littlehorse-enterprises/kafka that referenced this pull request Nov 12, 2025
…on Java 25 (apache#20704)

Prologue:
- apache#20561 (comment)
___

Related JIRA ticket: KAFKA-19771

details:

- spotbugs: 4.9.4 -->> 4.9.8
- spotbugs gradle plugin: 6.2.5 -->> 6.4.4
- spotbugs tasks are enabled for Java 25

related links:
-

https://github.com/spotbugs/spotbugs/blob/4.9.8/CHANGELOG.md#498---2025-10-18
- https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/6.4.4

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
eduwercamacaro pushed a commit to littlehorse-enterprises/kafka that referenced this pull request Nov 12, 2025
Related

discussion:apache#20561 (comment)

This PR primarily upgrades release tooling to JDK 25,  and includes  two
fixes identified while dry-running `release.py` locally.

1. JDK upgrade:  Switches `release.py` to run under JDK 25.

2. Pre‑req check false negative in git clean‑state verification task

* When running `release.py` with a clean working tree, the script
incorrectly failed the pre‑requisite check.

```bash
$ git status
On branch MINOR-1014
nothing to commit, working tree clean

$ python release.py
...
FAILURE: Pre-requisite not met: Verifying that you have no unstaged git
changes.
```
* Root cause: the checks used `has_unstaged_changes()` /
`has_staged_changes()` in a way that treated success as “has changes”.
The fix inverts the logic to assert **no** changes.

3. Gradle 9 aggregatedJavadoc failure

* With **Gradle 9**, `aggregatedJavadoc` currently fails in parallel
mode.
```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':aggregatedJavadoc'.
> Resolution of the configuration ':connect:compileClasspath' was
attempted without an exclusive lock. This is unsafe and not allowed.
```
* The change adds `--no-parallel` for the aggregated Javadoc step to
avoid build failures (discussion:
apache#19513 (comment))

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Ming-Yen Chung
 <mingyen066@gmail.com>, kuoche1712003 <kuoche1712003@gmail.com>,
 Chia-Ping Tsai <chia7712@gmail.com>
@chia7712
Copy link
Member

Thanks for the PR @dejan2609 . Can you try updating the signature algorithm as I suggested in the JIRA please? Hopefully that should unblock you 🤞

@gaurav-narula Thanks for sharing this. I encountered a similar error while running the test on my Fedora server. I will file a patch for 4.1, 4.0, and 3.9 based on your suggestion.

chia7712 pushed a commit that referenced this pull request Nov 22, 2025
…portLayerTest (#20961)

`SHA1withRSA` is disabled in some linux distribution, such as Fedora 43
server, which results in the following error. Hence, this PR adopts the
solution suggested by @gaurav-narula in
#20561 (comment),
which is to use `SHA256withRSA` instead of `SHA1withRSA`

```
Gradle Test Run :clients:test > Gradle Test Executor 28 > Tls13SslFactoryTest > testSslFactoryConfiguration() FAILED
    org.apache.kafka.common.config.ConfigException: Invalid value javax.net.ssl.SSLHandshakeException: (handshake_failure) No available authentication scheme for configuration A client SSLEngine created with the provided settings can't connect to a server SSLEngine created with those settings.
        at app//org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:105)
        at app//org.apache.kafka.common.security.ssl.SslFactoryTest.testSslFactoryConfiguration(SslFactoryTest.java:80)
        at java.base@21.0.9/java.lang.reflect.Method.invoke(Method.java:580)
        at java.base@21.0.9/java.util.ArrayList.forEach(ArrayList.java:1596)
        at java.base@21.0.9/java.util.ArrayList.forEach(ArrayList.java:1596)
```

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
chia7712 pushed a commit to chia7712/kafka that referenced this pull request Nov 22, 2025
…portLayerTest (apache#20961)

`SHA1withRSA` is disabled in some linux distribution, such as Fedora 43
server, which results in the following error. Hence, this PR adopts the
solution suggested by @gaurav-narula in
apache#20561 (comment),
which is to use `SHA256withRSA` instead of `SHA1withRSA`

```
Gradle Test Run :clients:test > Gradle Test Executor 28 > Tls13SslFactoryTest > testSslFactoryConfiguration() FAILED
    org.apache.kafka.common.config.ConfigException: Invalid value javax.net.ssl.SSLHandshakeException: (handshake_failure) No available authentication scheme for configuration A client SSLEngine created with the provided settings can't connect to a server SSLEngine created with those settings.
        at app//org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:105)
        at app//org.apache.kafka.common.security.ssl.SslFactoryTest.testSslFactoryConfiguration(SslFactoryTest.java:80)
        at java.base@21.0.9/java.lang.reflect.Method.invoke(Method.java:580)
        at java.base@21.0.9/java.util.ArrayList.forEach(ArrayList.java:1596)
        at java.base@21.0.9/java.util.ArrayList.forEach(ArrayList.java:1596)
```

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
chia7712 pushed a commit that referenced this pull request Nov 22, 2025
…portLayerTest (#20961)

`SHA1withRSA` is disabled in some linux distribution, such as Fedora 43
server, which results in the following error. Hence, this PR adopts the
solution suggested by @gaurav-narula in
#20561 (comment),
which is to use `SHA256withRSA` instead of `SHA1withRSA`

```
Gradle Test Run :clients:test > Gradle Test Executor 28 > Tls13SslFactoryTest > testSslFactoryConfiguration() FAILED
    org.apache.kafka.common.config.ConfigException: Invalid value javax.net.ssl.SSLHandshakeException: (handshake_failure) No available authentication scheme for configuration A client SSLEngine created with the provided settings can't connect to a server SSLEngine created with those settings.
        at app//org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:105)
        at app//org.apache.kafka.common.security.ssl.SslFactoryTest.testSslFactoryConfiguration(SslFactoryTest.java:80)
        at java.base@21.0.9/java.lang.reflect.Method.invoke(Method.java:580)
        at java.base@21.0.9/java.util.ArrayList.forEach(ArrayList.java:1596)
        at java.base@21.0.9/java.util.ArrayList.forEach(ArrayList.java:1596)
```

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
chia7712 pushed a commit to chia7712/kafka that referenced this pull request Nov 22, 2025
…portLayerTest (apache#20961)

`SHA1withRSA` is disabled in some linux distribution, such as Fedora 43
server, which results in the following error. Hence, this PR adopts the
solution suggested by @gaurav-narula in
apache#20561 (comment),
which is to use `SHA256withRSA` instead of `SHA1withRSA`

```
Gradle Test Run :clients:test > Gradle Test Executor 28 > Tls13SslFactoryTest > testSslFactoryConfiguration() FAILED
    org.apache.kafka.common.config.ConfigException: Invalid value javax.net.ssl.SSLHandshakeException: (handshake_failure) No available authentication scheme for configuration A client SSLEngine created with the provided settings can't connect to a server SSLEngine created with those settings.
        at app//org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:105)
        at app//org.apache.kafka.common.security.ssl.SslFactoryTest.testSslFactoryConfiguration(SslFactoryTest.java:80)
        at java.base@21.0.9/java.lang.reflect.Method.invoke(Method.java:580)
        at java.base@21.0.9/java.util.ArrayList.forEach(ArrayList.java:1596)
        at java.base@21.0.9/java.util.ArrayList.forEach(ArrayList.java:1596)
```

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
TaiJuWu pushed a commit to TaiJuWu/kafka that referenced this pull request Dec 3, 2025
…on Java 25 (apache#20704)

Prologue:
- apache#20561 (comment)
___

Related JIRA ticket: KAFKA-19771

details:

- spotbugs: 4.9.4 -->> 4.9.8
- spotbugs gradle plugin: 6.2.5 -->> 6.4.4
- spotbugs tasks are enabled for Java 25

related links:
-

https://github.com/spotbugs/spotbugs/blob/4.9.8/CHANGELOG.md#498---2025-10-18
- https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/6.4.4

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
TaiJuWu pushed a commit to TaiJuWu/kafka that referenced this pull request Dec 3, 2025
Related

discussion:apache#20561 (comment)

This PR primarily upgrades release tooling to JDK 25,  and includes  two
fixes identified while dry-running `release.py` locally.

1. JDK upgrade:  Switches `release.py` to run under JDK 25.

2. Pre‑req check false negative in git clean‑state verification task

* When running `release.py` with a clean working tree, the script
incorrectly failed the pre‑requisite check.

```bash
$ git status
On branch MINOR-1014
nothing to commit, working tree clean

$ python release.py
...
FAILURE: Pre-requisite not met: Verifying that you have no unstaged git
changes.
```
* Root cause: the checks used `has_unstaged_changes()` /
`has_staged_changes()` in a way that treated success as “has changes”.
The fix inverts the logic to assert **no** changes.

3. Gradle 9 aggregatedJavadoc failure

* With **Gradle 9**, `aggregatedJavadoc` currently fails in parallel
mode.
```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':aggregatedJavadoc'.
> Resolution of the configuration ':connect:compileClasspath' was
attempted without an exclusive lock. This is unsafe and not allowed.
```
* The change adds `--no-parallel` for the aggregated Javadoc step to
avoid build failures (discussion:
apache#19513 (comment))

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Ming-Yen Chung
 <mingyen066@gmail.com>, kuoche1712003 <kuoche1712003@gmail.com>,
 Chia-Ping Tsai <chia7712@gmail.com>
shashankhs11 pushed a commit to shashankhs11/kafka that referenced this pull request Dec 15, 2025
This patch updates the Apache Kafka project's build, test, and
dependency configurations.

- Java Version Update: The build and test processes have been upgraded
from Java 24 to Java 25.
- Scala Version Update: The Scala library version has been updated from
2.13.16 to 2.13.17.
-  Dependency Upgrades: Several dependencies have been updated to newer
versions, including mockito (5.14.2 to 5.20.0), zinc (1.10.8 to 1.11.0),
and scala-library/reflect (2.13.16 to 2.13.17).
- Code and Configuration Changes: The patch modifies build.gradle to
exclude certain Spotbugs tasks for Java 25 compatibility. It also
changes the default signing algorithm in TestSslUtils.java from
SHA1withRSA to SHA256withRSA, enhancing security.
- Documentation: The README.md file has been updated to reflect the new
Java 25 requirement.

Reviewers: Ismael Juma <ismael@juma.me.uk>, Liam Clarke-Hutchinson
 <liam@steelsky.co.nz>, Gaurav Narula <gaurav_narula2@apple.com>,
 Chia-Ping Tsai <chia7712@gmail.com>
shashankhs11 pushed a commit to shashankhs11/kafka that referenced this pull request Dec 15, 2025
…on Java 25 (apache#20704)

Prologue:
- apache#20561 (comment)
___

Related JIRA ticket: KAFKA-19771

details:

- spotbugs: 4.9.4 -->> 4.9.8
- spotbugs gradle plugin: 6.2.5 -->> 6.4.4
- spotbugs tasks are enabled for Java 25

related links:
-

https://github.com/spotbugs/spotbugs/blob/4.9.8/CHANGELOG.md#498---2025-10-18
- https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/6.4.4

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
shashankhs11 pushed a commit to shashankhs11/kafka that referenced this pull request Dec 15, 2025
Related

discussion:apache#20561 (comment)

This PR primarily upgrades release tooling to JDK 25,  and includes  two
fixes identified while dry-running `release.py` locally.

1. JDK upgrade:  Switches `release.py` to run under JDK 25.

2. Pre‑req check false negative in git clean‑state verification task

* When running `release.py` with a clean working tree, the script
incorrectly failed the pre‑requisite check.

```bash
$ git status
On branch MINOR-1014
nothing to commit, working tree clean

$ python release.py
...
FAILURE: Pre-requisite not met: Verifying that you have no unstaged git
changes.
```
* Root cause: the checks used `has_unstaged_changes()` /
`has_staged_changes()` in a way that treated success as “has changes”.
The fix inverts the logic to assert **no** changes.

3. Gradle 9 aggregatedJavadoc failure

* With **Gradle 9**, `aggregatedJavadoc` currently fails in parallel
mode.
```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':aggregatedJavadoc'.
> Resolution of the configuration ':connect:compileClasspath' was
attempted without an exclusive lock. This is unsafe and not allowed.
```
* The change adds `--no-parallel` for the aggregated Javadoc step to
avoid build failures (discussion:
apache#19513 (comment))

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Ming-Yen Chung
 <mingyen066@gmail.com>, kuoche1712003 <kuoche1712003@gmail.com>,
 Chia-Ping Tsai <chia7712@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Gradle build or GitHub Actions ci-approved clients dependencies Pull requests that update a dependency file small Small PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants