Skip to content

Conversation

dejan2609
Copy link
Contributor

@dejan2609 dejan2609 commented Apr 18, 2025

Related JIRA ticket: https://issues.apache.org/jira/browse/KAFKA-19174

List of changes:

  • prerequisite Jira ticket:
  • mandatory version upgrades:
    • Gradle version: 8.14.3 -->> 9.0.0 9.1.0
    • Gradle Shadow plugin: 8.3.6 -->> 9.0.2 8.3.9
  • build logic will be refactored to accommodate Gradle 9 breaking
    changes
  • (optional): a dozen of Gradle plugins versions will also be upgraded
  • other JIRA tickets that had to be solved all along:

Related links:

Notes:

Reviewers: Chia-Ping Tsai [email protected]

@github-actions github-actions bot added triage PRs from the community build Gradle build or GitHub Actions small Small PRs labels Apr 18, 2025
@dejan2609 dejan2609 changed the title [KAFKA-19174] Gradle version upgrade 8 -->> 9 [Work in progress] [KAFKA-19174] Gradle version upgrade 8 -->> 9 Apr 18, 2025
Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

Copy link

This PR is being marked as stale since it has not had any activity in 90 days. If you
would like to keep this PR alive, please leave a comment asking for a review. If the PR has
merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact).

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

@github-actions github-actions bot added stale Stale PRs and removed needs-attention stale Stale PRs labels Jul 25, 2025
Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@dejan2609
Copy link
Contributor Author

Update: project compilation works as expected (when powered by Gradle 9) but binary release creation fails.
More work has to be done in order to accommodate to Gradle breaking changes.

Copy link

github-actions bot commented Aug 3, 2025

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@chia7712
Copy link
Member

chia7712 commented Aug 6, 2025

@dejan2609 any update?

Copy link

github-actions bot commented Aug 8, 2025

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@dejan2609
Copy link
Contributor Author

@chia7712
Will provide an update during the weekend (there are two problems with Gradle 9 build, will explain in more details and provide some insights).

@chia7712
Copy link
Member

chia7712 commented Aug 8, 2025

@dejan2609 thanks!

@dejan2609
Copy link
Contributor Author

@chia7712 feel free to check this related PR: #20327

@dejan2609
Copy link
Contributor Author

Pending: I will also explain second problem (specific to Gradle 9, that is).

Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@dejan2609 dejan2609 requested a review from chia7712 October 6, 2025 17:31
@dejan2609
Copy link
Contributor Author

dejan2609 commented Oct 6, 2025

@chia7712 A few unrelated tests are broken (for both Java 17 and 24) but other than that the build looks fine.

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.

LGTM

java-version: ${{ inputs.java-version }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
uses: gradle/actions/setup-gradle@748248ddd2a24f49513d8f472f81c3a07d4d50e1 # v4.4.4
Copy link
Member

Choose a reason for hiding this comment

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

Version 5.0.0 has been released. As a follow-up, I will file a minor patch to revisit all actions

#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
Copy link
Member

Choose a reason for hiding this comment

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

I have filed https://issues.apache.org/jira/browse/KAFKA-19756 to write down the correct steps for upgrading gradle

@chia7712 chia7712 merged commit c6bbbbe into apache:trunk Oct 7, 2025
19 of 22 checks passed
@dejan2609
Copy link
Contributor Author

Thank you for merging this @chia7712 ! It was quite a challenge to work on this, I will come up with a separate comment to credit all the people who were involved 🙂

I created two more related JIRA tickets:

  • KAFKA-19761 Reorder Gradle tasks (in order to bump Shadow plugin version)
  • KAFKA-19762 Turn on Gradle reproducible builds feature

"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
Copy link
Member

Choose a reason for hiding this comment

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

This change, introduced in gradle 8.14, seems to be a behavioral change. It causes a no main manifest attribute error if developers use the old wrapper. I will file a PR to revert to the previous behavior and open a Jira ticket for 5.0 to remove the workaround

gradle/gradle@5949f60
gradle/gradle@f51d28d

Copy link
Contributor

Choose a reason for hiding this comment

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

I file the PR #20658 already.

chia7712 pushed a commit that referenced this pull request Oct 8, 2025
…ome issues with Gradle 9+ are solved) (#20652)

Extends from: #19513

Note: in Gradle 9+ we have to add a switch like this:
```
./gradlew dependencyUpdates --no-parallel
```
Related link:
https://github.com/ben-manes/gradle-versions-plugin/releases/tag/v0.53.0

Reviewers: Chia-Ping Tsai <[email protected]>
@omkreddy
Copy link
Contributor

@dejan2609 Thanks for working in this. It looks like a few custom tasks (./gradlew unitTest, ./gradlew integrationTest) aren’t working as expected after the upgrade.

cc @chia7712

@dejan2609
Copy link
Contributor Author

@dejan2609 Thanks for working in this. It looks like a few custom tasks (./gradlew unitTest, ./gradlew integrationTest) aren’t working as expected after the upgrade.

cc @chia7712

Ok, let me check that.

@dejan2609
Copy link
Contributor Author

@omkreddy Can't find issues here:

dejan@dejan-HP-ProBook-450-G7:~/kafka$ date
Fri 10 Oct 09:28:15 CEST 2025
dejan@dejan-HP-ProBook-450-G7:~/kafka$ git status 
On branch trunk
Your branch is up-to-date with 'origin/trunk'.

nothing to commit, working tree clean
dejan@dejan-HP-ProBook-450-G7:~/kafka$ git checkout c6bbbbe24d
Note: switching to 'c6bbbbe24d'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at c6bbbbe24d KAFKA-19174 Gradle version upgrade 8 -->> 9 (#19513)
dejan@dejan-HP-ProBook-450-G7:~/kafka$ git log -1 --oneline 
c6bbbbe24d (HEAD) KAFKA-19174 Gradle version upgrade 8 -->> 9 (#19513)
dejan@dejan-HP-ProBook-450-G7:~/kafka$ java -version
openjdk version "17.0.16" 2025-07-15
OpenJDK Runtime Environment Temurin-17.0.16+8 (build 17.0.16+8)
OpenJDK 64-Bit Server VM Temurin-17.0.16+8 (build 17.0.16+8, mixed mode, sharing)
dejan@dejan-HP-ProBook-450-G7:~/kafka$ ./gradlew unitTest -q
Starting build with version 4.2.0-SNAPSHOT (commit id c6bbbbe2) using Gradle 9.1.0, Java 17 and Scala 2.13.16
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0
MessageGenerator: processed 1 Kafka message JSON file(s).
MessageGenerator: processed 2 Kafka message JSON file(s).
MessageGenerator: processed 5 Kafka message JSON file(s).
MessageGenerator: processed 4 Kafka message JSON file(s).
MessageGenerator: processed 1 Kafka message JSON file(s).
MessageGenerator: processed 44 Kafka message JSON file(s).
MessageGenerator: processed 26 Kafka message JSON file(s).
MessageGenerator: processed 197 Kafka message JSON file(s).
MessageGenerator: processed 4 Kafka message JSON file(s).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/dejan/kafka/metadata/src/test/java/org/apache/kafka/controller/metrics/QuorumControllerMetricsTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /home/dejan/kafka/server/src/test/java/org/apache/kafka/server/AssignmentsManagerTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
dejan@dejan-HP-ProBook-450-G7:~/kafka$ ./gradlew integrationTest -q
Starting build with version 4.2.0-SNAPSHOT (commit id c6bbbbe2) using Gradle 9.1.0, Java 17 and Scala 2.13.16
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0
dejan@dejan-HP-ProBook-450-G7:~/kafka$ sdk use java 24.0.2-tem

Using java version 24.0.2-tem in this shell.
dejan@dejan-HP-ProBook-450-G7:~/kafka$ java -version 
openjdk version "24.0.2" 2025-07-15
OpenJDK Runtime Environment Temurin-24.0.2+12 (build 24.0.2+12)
OpenJDK 64-Bit Server VM Temurin-24.0.2+12 (build 24.0.2+12, mixed mode, sharing)
dejan@dejan-HP-ProBook-450-G7:~/kafka$ ./gradlew unitTest -q
Starting build with version 4.2.0-SNAPSHOT (commit id c6bbbbe2) using Gradle 9.1.0, Java 24 and Scala 2.13.16
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0
MessageGenerator: processed 1 Kafka message JSON file(s).
MessageGenerator: processed 4 Kafka message JSON file(s).
MessageGenerator: processed 2 Kafka message JSON file(s).
MessageGenerator: processed 1 Kafka message JSON file(s).
MessageGenerator: processed 5 Kafka message JSON file(s).
MessageGenerator: processed 26 Kafka message JSON file(s).
MessageGenerator: processed 44 Kafka message JSON file(s).
MessageGenerator: processed 197 Kafka message JSON file(s).
MessageGenerator: processed 4 Kafka message JSON file(s).
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by sbt.internal.shaded.com.google.protobuf.UnsafeUtil$MemoryAccessor (file:/home/dejan/.gradle/caches/modules-2/files-2.1/org.scala-sbt/zinc-persist-core-assembly/1.10.8/f29192c40cd73f2880b38e33ed9331ff70652d76/zinc-persist-core-assembly-1.10.8.jar)
WARNING: Please consider reporting this to the maintainers of class sbt.internal.shaded.com.google.protobuf.UnsafeUtil$MemoryAccessor
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/dejan/kafka/metadata/src/test/java/org/apache/kafka/controller/metrics/QuorumControllerMetricsTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /home/dejan/kafka/server/src/test/java/org/apache/kafka/server/AssignmentsManagerTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
dejan@dejan-HP-ProBook-450-G7:~/kafka$ ./gradlew integrationTest -q
Starting build with version 4.2.0-SNAPSHOT (commit id c6bbbbe2) using Gradle 9.1.0, Java 24 and Scala 2.13.16
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0
dejan@dejan-HP-ProBook-450-G7:~/kafka$ date
Fri 10 Oct 09:38:24 CEST 2025
dejan@dejan-HP-ProBook-450-G7:~/kafka$ 

@dejan2609
Copy link
Contributor Author

@omkreddy The same goes for a current trunk state (no errors whatsoever):

dejan@dejan-HP-ProBook-450-G7:~/kafka$ date
Fri 10 Oct 09:43:26 CEST 2025
dejan@dejan-HP-ProBook-450-G7:~/kafka$ git log -1 --oneline 
1e95d04639 (HEAD -> trunk, upstream/trunk, upstream/HEAD, origin/trunk, origin/HEAD) KAFKA-19747: Update ClientTelemetryReporter telemetry push error handling (#20661)
dejan@dejan-HP-ProBook-450-G7:~/kafka$ java -version 
openjdk version "17.0.16" 2025-07-15
OpenJDK Runtime Environment Temurin-17.0.16+8 (build 17.0.16+8)
OpenJDK 64-Bit Server VM Temurin-17.0.16+8 (build 17.0.16+8, mixed mode, sharing)
dejan@dejan-HP-ProBook-450-G7:~/kafka$ ./gradlew unitTest -q
Starting build with version 4.2.0-SNAPSHOT (commit id 1e95d046) using Gradle 9.1.0, Java 17 and Scala 2.13.17
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0
MessageGenerator: processed 1 Kafka message JSON file(s).
MessageGenerator: processed 5 Kafka message JSON file(s).
MessageGenerator: processed 4 Kafka message JSON file(s).
MessageGenerator: processed 2 Kafka message JSON file(s).
MessageGenerator: processed 1 Kafka message JSON file(s).
MessageGenerator: processed 26 Kafka message JSON file(s).
MessageGenerator: processed 44 Kafka message JSON file(s).
MessageGenerator: processed 197 Kafka message JSON file(s).
MessageGenerator: processed 4 Kafka message JSON file(s).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/dejan/kafka/metadata/src/test/java/org/apache/kafka/controller/metrics/QuorumControllerMetricsTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /home/dejan/kafka/server/src/test/java/org/apache/kafka/server/AssignmentsManagerTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
dejan@dejan-HP-ProBook-450-G7:~/kafka$ ./gradlew integrationTest -q
Starting build with version 4.2.0-SNAPSHOT (commit id 1e95d046) using Gradle 9.1.0, Java 17 and Scala 2.13.17
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0
dejan@dejan-HP-ProBook-450-G7:~/kafka$ sdk use java 25-tem

Using java version 25-tem in this shell.
dejan@dejan-HP-ProBook-450-G7:~/kafka$ java -version 
openjdk version "25" 2025-09-16 LTS
OpenJDK Runtime Environment Temurin-25+36 (build 25+36-LTS)
OpenJDK 64-Bit Server VM Temurin-25+36 (build 25+36-LTS, mixed mode, sharing)
dejan@dejan-HP-ProBook-450-G7:~/kafka$ ./gradlew unitTest -q
Starting build with version 4.2.0-SNAPSHOT (commit id 1e95d046) using Gradle 9.1.0, Java 25 and Scala 2.13.17
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0
MessageGenerator: processed 2 Kafka message JSON file(s).
MessageGenerator: processed 1 Kafka message JSON file(s).
MessageGenerator: processed 1 Kafka message JSON file(s).
MessageGenerator: processed 4 Kafka message JSON file(s).
MessageGenerator: processed 26 Kafka message JSON file(s).
MessageGenerator: processed 5 Kafka message JSON file(s).
MessageGenerator: processed 44 Kafka message JSON file(s).
MessageGenerator: processed 197 Kafka message JSON file(s).
MessageGenerator: processed 4 Kafka message JSON file(s).
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by sbt.internal.shaded.com.google.protobuf.UnsafeUtil$MemoryAccessor (file:/home/dejan/.gradle/caches/modules-2/files-2.1/org.scala-sbt/zinc-persist-core-assembly/1.11.0/79a5ffae430cc389d51b03650efb7c2253aa9f30/zinc-persist-core-assembly-1.11.0.jar)
WARNING: Please consider reporting this to the maintainers of class sbt.internal.shaded.com.google.protobuf.UnsafeUtil$MemoryAccessor
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/dejan/kafka/metadata/src/test/java/org/apache/kafka/controller/metrics/QuorumControllerMetricsTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /home/dejan/kafka/server/src/test/java/org/apache/kafka/server/AssignmentsManagerTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
dejan@dejan-HP-ProBook-450-G7:~/kafka$ ./gradlew integrationTest -q
Starting build with version 4.2.0-SNAPSHOT (commit id 1e95d046) using Gradle 9.1.0, Java 25 and Scala 2.13.17
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0
dejan@dejan-HP-ProBook-450-G7:~/kafka$ date
Fri 10 Oct 09:53:40 CEST 2025
dejan@dejan-HP-ProBook-450-G7:~/kafka$

@dejan2609
Copy link
Contributor Author

@dejan2609 Thanks for working in this. It looks like a few custom tasks (./gradlew unitTest, ./gradlew integrationTest) aren’t working as expected after the upgrade.

cc @chia7712

All in all: I see no errors here @omkreddy
Please explain your case in more detail and create a ticket here: https://issues.apache.org/jira/projects/KAFKA/issues

@omkreddy
Copy link
Contributor

omkreddy commented Oct 10, 2025

@dejan2609 I think the command/task (unitTest) is not running the tests. Normally we should see test execution output like

➜  kafka git:(f5a87b3703) ./gradlew clean  unitTest

> Configure project :
Starting build with version 4.2.0-SNAPSHOT (commit id f5a87b37) using Gradle 8.14.3, Java 17 and Scala 2.13.16
Build properties: ignoreFailures=false, maxParallelForks=10, maxScalacThreads=8, maxTestRetries=0

> Task :metadata:processMessages
MessageGenerator: processed 26 Kafka message JSON file(s).

> Task :clients:processMessages
MessageGenerator: processed 197 Kafka message JSON file(s).

> Task :raft:processMessages
MessageGenerator: processed 1 Kafka message JSON file(s).

> Task :storage:processMessages
MessageGenerator: processed 5 Kafka message JSON file(s).

> Task :transaction-coordinator:processMessages
MessageGenerator: processed 2 Kafka message JSON file(s).

> Task :group-coordinator:processMessages
MessageGenerator: processed 44 Kafka message JSON file(s).

> Task :share-coordinator:processMessages
MessageGenerator: processed 4 Kafka message JSON file(s).

> Task :streams:processMessages
MessageGenerator: processed 1 Kafka message JSON file(s).

> Task :generator:unitTest

Gradle Test Run :generator:unitTest > Gradle Test Executor 146 > EntityTypeTest > testVerifyTypeMismatches() PASSED

Gradle Test Run :generator:unitTest > Gradle Test Executor 146 > EntityTypeTest > testVerifyTypeMatches() PASSED

Gradle Test Run :generator:unitTest > Gradle Test Executor 146 > EntityTypeTest > testUnknownEntityType() PASSED

Gradle Test Run :generator:unitTest > Gradle Test Executor 148 > CodeBufferTest > testWrite() PASSED

Gradle Test Run :generator:unitTest > Gradle Test Executor 148 > CodeBufferTest > testIndentMustBeNonNegative() PASSED

Gradle Test Run :generator:unitTest > Gradle Test Executor 148 > CodeBufferTest > testEquals() PASSED
...
...

On trunk:

➜  kafka git:(trunk) ./gradlew clean  unitTest

> Configure project :
Starting build with version 4.2.0-SNAPSHOT (commit id 1e95d046) using Gradle 9.1.0, Java 17 and Scala 2.13.17
Build properties: ignoreFailures=false, maxParallelForks=10, maxScalacThreads=8, maxTestRetries=0

> Task :streams:processMessages
MessageGenerator: processed 1 Kafka message JSON file(s).

> Task :transaction-coordinator:processMessages
MessageGenerator: processed 2 Kafka message JSON file(s).

> Task :share-coordinator:processMessages
MessageGenerator: processed 4 Kafka message JSON file(s).

> Task :raft:processMessages
MessageGenerator: processed 1 Kafka message JSON file(s).

> Task :storage:processMessages
MessageGenerator: processed 5 Kafka message JSON file(s).

> Task :group-coordinator:processMessages
MessageGenerator: processed 44 Kafka message JSON file(s).

> Task :metadata:processMessages
MessageGenerator: processed 26 Kafka message JSON file(s).

> Task :clients:processMessages
MessageGenerator: processed 197 Kafka message JSON file(s).

> Task :clients:processTestMessages
MessageGenerator: processed 4 Kafka message JSON file(s).

> Task :clients:compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :metadata:compileTestJava
Note: /Users/manikumar/workspace/kafka/metadata/src/test/java/org/apache/kafka/controller/metrics/QuorumControllerMetricsTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :server:compileTestJava
Note: /Users/manikumar/workspace/kafka/server/src/test/java/org/apache/kafka/server/AssignmentsManagerTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

[Incubating] Problems report is available at: file:///Users/manikumar/workspace/kafka/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 10.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/9.1.0/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 1m 28s

@dejan2609
Copy link
Contributor Author

dejan2609 commented Oct 10, 2025

@dejan2609 I think the command is not running the tests. Normally we should see test execution output like

@omkreddy Are you referring to the command(s) that I used, i.e../gradlew <command> -q ?
It runs everything (including tests), but the output is silenced to show errors only (and it shows no errors because they are nowhere to be found).

See here for more details: https://docs.gradle.org/9.1.0/userguide/command_line_interface.html#sec:command_line_logging

-q, --quiet

    Log errors only.

Now, even your output posted above shows no errors: BUILD SUCCESSFUL in 1m 28s
image

Can't help you unless you file a JIRA ticket with the exact error scenario:

  • git commit where the issue occurs
  • stack trace (Gradle output)
  • details about your local box: Java version(s), Java vendor(s), operating system (Windows, Mac, Linux), etc.

📢 Edit/update (after few days or so): I was wrong, @omkreddy was right: I was searching for errors and while it's true that there are none of them tests are still skipped

@chia7712
Copy link
Member

@omkreddy Thanks for your report. We will take a look and test other commands to ensure everything works correctly

@yeikel
Copy link
Contributor

yeikel commented Oct 10, 2025

@omkreddy Thanks for your report. We will take a look and test other commands to ensure everything works correctly

Can we add a CI task that validates these commands? I'd assume that the goal should be to avoid regressions for these moving forward

A separate workflow would be fine, I think

@chia7712
Copy link
Member

I will file a PR to fix the task unittest and integrationTest according to https://docs.gradle.org/current/userguide/upgrading_major_version_9.html#test_tasks_may_no_longer_execute_expected_tests

A separate workflow would be fine, I think

there are many custom tasks in kafka, but yes it is worth having the CI - I have opened https://issues.apache.org/jira/browse/KAFKA-19780 to discuss that later.

@chia7712
Copy link
Member

Another task, aggregatedJavadoc, is also faling with an error similar to the one in #20628 - will dig in it later

@chia7712
Copy link
Member

Another task, aggregatedJavadoc, is also faling with an error similar to the one in #20628 - will dig in it later

The simple fix is to add --no-parallel to the aggregatedJavadoc task, The build time increased from 9s to 12s, so the regression should be acceptable.

@chia7712
Copy link
Member

I noticed another error that was introduced by #12280 and it unrelated to Gradle9

* What went wrong:
A problem occurred evaluating root project 'kafka'.
> No such property: name for class: org.gradle.language.scala.tasks.KeepAliveMode

It can be fixed by changing the name to name()

chia7712 pushed a commit that referenced this pull request Oct 12, 2025
…ded with a `--no-parallel` switch (#20683)

Prologue:
#19513 (comment)

Also related to: #20652

@chia7712 I double-checked custom gradle commands in `README.md` and
AFAIK we should be fine now.

Reviewers: Chia-Ping Tsai <[email protected]>
chia7712 pushed a commit that referenced this pull request Oct 12, 2025
…-->> 9 (#20684)

from: #19513 (comment)

1. Fix the task `unitTest` and `integrationTest`;
2. Change the `name` to a method call `name()` for `KeepAliveMode`.

Reviewers: Ken Huang <[email protected]>, dejan2609
 <[email protected]>, Chia-Ping Tsai <[email protected]>
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 small Small PRs tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants