Skip to content

Conversation

@srdo
Copy link
Contributor

@srdo srdo commented Aug 2, 2025

This commit updates CI to test against Java 24 instead of Java 23 which
is EOL.

Due to Spotbugs not having released version 4.9.4 yet, we can't run
Spotbugs on Java 24. Instead, we are choosing to run Spotbugs, and the
rest of the compile and validate build step, on Java 17 for now.

Once 4.9.4 has released, we will switch to using Java 24 for this.

Exclude spotbugs from the run-tests gradle action. Spotbugs is already
being run once in the build by "compile and validate", there is no
reason to run it again as part of executing tests.

Reviewers: Chia-Ping Tsai chia7712@gmail.com

@github-actions github-actions bot added triage PRs from the community build Gradle build or GitHub Actions small Small PRs labels Aug 2, 2025
@srdo srdo force-pushed the java-24-build-no-spotbugs branch from a222ae8 to 28ee92b Compare August 2, 2025 12:07
@srdo srdo mentioned this pull request Aug 2, 2025
This commit updates CI to test against Java 24 instead of Java 23 which is
EOL.

Due to Spotbugs not having released version 4.9.4 yet, we can't run Spotbugs
on Java 24. Instead, we are choosing to run Spotbugs, and the rest of
the compile and validate build step, on Java 17 for now.

Once 4.9.4 has released, we will switch to using Java 24 for this.

Exclude spotbugs from the run-tests gradle action. Spotbugs is already
being run once in the build by "compile and validate", there is no reason
to run it again as part of executing tests.
@srdo srdo force-pushed the java-24-build-no-spotbugs branch from 28ee92b to 1ad1bb9 Compare August 2, 2025 12:26
@srdo srdo marked this pull request as ready for review August 2, 2025 12:26
@srdo
Copy link
Contributor Author

srdo commented Aug 2, 2025

The failures in the build scan steps are because (if I understand the Github docs at https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#workflow_run correctly) the ci-complete workflow executes based on the state of master, not the state of this branch.

This means that until this is merged, the old version of ci-complete will be used, which is why those build steps still reference Java 23.

It might have been better if ci-complete was called explicitly by workflow_call, since that would ensure that the branch used for ci-complete.yaml is the same as the one used for ci.yaml.

edit:

The use of workflow_run seems intentional, and is likely because workflow_run has access to repo secrets while workflow_call would not have such acccess. So changing to workflow_call would be a bad idea, since the code in ci-complete.yml wants access to some secrets that we don't want to allow workflow scripts coming from PR branches to access.

So there's not much to do: This build will fail because it uses the master version of ci-complete.yml, and there isn't much I can do about that.

Once merged, this failure should go away.

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.

@srdo thanks for this patch.

-Pkafka.cluster.test.repeat=$TEST_REPEAT \
-Pkafka.test.verbose=$TEST_VERBOSE \
-PcommitId=xxxxxxxxxxxxxxxx \
-x spotbugsMain \
Copy link
Member

Choose a reason for hiding this comment

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

Building Kafka locally with JDK 24 still results in a SpotBugs error. Could you please update the build.gradle file to skip SpotBugs check based on the JDK version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@github-actions github-actions bot removed the triage PRs from the community label Aug 5, 2025
"--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED"
)

if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_24)) {
Copy link
Member

Choose a reason for hiding this comment

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

open https://issues.apache.org/jira/browse/KAFKA-19580 to trace the spotbug upgrade.

<th>Java 11</th>
<th>Java 17</th>
<th>Java 23</th>
<th>Java 24</th>
Copy link
Member

Choose a reason for hiding this comment

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

could you please revert this change? we don't run java 24 for 4.1 and 4.0 branch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, done

@chia7712 chia7712 merged commit 25da705 into apache:trunk Aug 5, 2025
19 of 22 checks passed
airlock-confluentinc bot pushed a commit to confluentinc/kafka that referenced this pull request Aug 6, 2025
This commit updates CI to test against Java 24 instead of Java 23 which
is EOL.

Due to Spotbugs not having released version 4.9.4 yet, we can't run
Spotbugs on Java 24. Instead, we are choosing to run Spotbugs, and the
rest of the compile and validate build step, on Java 17 for now.

Once 4.9.4 has released, we will switch to using Java 24 for this.

Exclude spotbugs from the run-tests gradle action. Spotbugs is already
being run once in the build by "compile and validate", there is no
reason  to run it again as part of executing tests.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
airlock-confluentinc bot pushed a commit to confluentinc/kafka that referenced this pull request Sep 25, 2025
This commit updates CI to test against Java 24 instead of Java 23 which
is EOL.

Due to Spotbugs not having released version 4.9.4 yet, we can't run
Spotbugs on Java 24. Instead, we are choosing to run Spotbugs, and the
rest of the compile and validate build step, on Java 17 for now.

Once 4.9.4 has released, we will switch to using Java 24 for this.

Exclude spotbugs from the run-tests gradle action. Spotbugs is already
being run once in the build by "compile and validate", there is no
reason  to run it again as part of executing tests.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
airlock-confluentinc bot pushed a commit to confluentinc/kafka that referenced this pull request Sep 25, 2025
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 small Small PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants