Commit Graph

134 Commits

Author SHA1 Message Date
Evanston Zhou 7ffd6934ad
MINOR: Add example integration test commands to README (#20413)
Adds example commands for running integration tests from the command
line.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-08-27 13:59:31 +08:00
Stig Døssing 25da705178
MINOR: Run CI with Java 24 (#20295)
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>
2025-08-05 21:26:13 +08:00
S.Y. Wang 58ad29cbfb
MINOR: Remove Kafka release section from root README (#19483)
Addressed the feedback
https://github.com/apache/kafka/pull/19420#discussion_r2045913751

Reviewers: TengYao Chi <kitingiao@gmail.com>, PoAn Yang
<payang@apache.org>, Chia-Ping Tsai <chia7712@gmail.com>
2025-04-16 15:34:33 +08:00
S.Y. Wang e9ca0bb0f6
KAFKA-18983 Ensure all README.md(s) are mentioned by the root README.md (#19420)
There are few README not added because I am not sure if they need to be
mentioned in root README.
```
./test-common/test-common-internal-api/src/main/java/org/apache/kafka/common/test/api/README.md
./storage/src/test/java/org/apache/kafka/tiered/storage/README.md
./.github/workflows/README.md
./raft/README.md
./committer-tools/README.md
```

Reviewers: Ken Huang <s7133700@gmail.com>, TengYao Chi
<kitingiao@gmail.com>, PoAn Yang <payang@apache.org>, Jhen-Yung Hsu
<jhenyunghsu@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-04-16 01:06:48 +08:00
Ken Huang 42799f7586
MINOR update the README docker image version (#19278)
The Docker image version should use `latest` instead of `3.7.0`,
allowing users to always pull the most up-to-date image from Docker Hub.

Reviewers: Sanskar Jhajharia <sjhajharia@confluent.io>, TengYao Chi
<kitingiao@gmail.com>
2025-04-10 22:25:14 +08:00
mingdaoy 06b7d2e045
MINOR: Add flaky-related commands to README.md (#19025)
Reviewers: Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-03-01 11:17:38 +08:00
David Arthur cb33e98dfc
KAFKA-18748 Run new tests separately in PRs (#18770)
Split the JUnit tests into "new", "flaky", and the remainder. 

On PR builds, "new" tests are anything that do not exist on trunk. They are run with zero tolerance for flakiness. 

On trunk builds, "new" tests are anything added in the last 7 days. They are run with some tolerance for flakiness.

Another change included here is that we will not update the test catalog if any test job fails on a trunk build. We have had difficulty determining if all the tests had or not (due to timeout or failures in upstream Gradle tasks). By requiring green ":test" jobs, we can be sure that the resulting catalog will be valid.

---

The purpose of this change is to discourage contributors from adding flaky tests, but give some leeway for trunk so we have successful builds.

The "quarantinedTest" Gradle target has been consolidated into the regular "test" target. There are now some
runtime properties to control what tests are run.

* kafka.test.catalog.file: path to test catalog
* kafka.test.run.new: include new tests. this selection depends on the age of the loaded test catalog
* kafka.test.run.flaky: include tests marked as `@Flaky` (replaces the `excludeTags 'flaky'` directive)
* kafka.test.verbose: include additional logging from new JUnit classes (enabled by default if re-running GitHub workflow with debug logging enabled)
* maxTestRetries: how many retries to allow via Develocity retry plugin (default 0)
* maxTestRetryFailures: how many failures to allow before stopping retries (default 0)


Thanks to Jun Rao for inspiring the idea.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Ismael Juma <ismael@juma.me.uk>, Jun Rao <junrao@gmail.com>
2025-02-24 17:08:15 -05:00
Shahbaz Aamir a565d8fdac
MINOR: removed unwanted line breaks (#18744)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-02-06 17:04:57 +08:00
TengYao Chi 7e86bd8281
KAFKA-18229: Move configs out of "kraft" directory (#18389)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Ismael Juma <ismael@juma.me.uk>, José Armando García Sancio <jsancio@apache.org>
2025-01-22 15:47:57 +01:00
TengYao Chi 753d685921
MINOR: Fix wrong link and extension name (#18545)
Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-01-15 09:03:11 +00:00
Swikar Patel d1b1d9d47d
KAFKA-18111: Add Kafka Logo to README (#18452)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2025-01-08 17:17:31 -08:00
Ismael Juma 6fc5c64928
MINOR: Various README tweaks (#18301)
1. Fix ambiguous statement where it could be interpreted that scalac is used for the clients module
2. Remove "in KRaft mode" because that's the only mode
3. Put IntelliJ first in IDE section and only mention the native gradle integration
4. Restore instructions for installing all projects to the local Maven repo, this was accidentally removed as part of the Scala 2.12 support removal.
2024-12-23 06:58:26 -08:00
David Arthur 8c1a2ff6e0
MINOR: fix links for badges (#18186)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-15 04:51:07 +08:00
David Arthur f3f975ea67
MINOR: Add badge for flaky test report (#18179)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-14 12:14:50 +08:00
Ken Huang 6af233e4fc
KAFKA-18203 Add a section for Java version in intellij idea in README (#18134)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-14 01:37:25 +08:00
TengYao Chi b37b89c668
KAFKA-9366 Upgrade log4j to log4j2 (#17373)
This pull request replaces Log4j with Log4j2 across the entire project, including dependencies, configurations, and code. The notable changes are listed below:

1. Introduce Log4j2 Instead of Log4j
2. Change Configuration File Format from Properties to YAML
3. Adds warnings to notify users if they are still using Log4j properties, encouraging them to transition to Log4j2 configurations

Co-authored-by: Lee Dongjin <dongjin@apache.org>

Reviewers: Luke Chen <showuon@gmail.com>, Mickael Maison <mickael.maison@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-14 01:14:31 +08:00
Yung eedd9cdf43
MINOR: Fix README for running a Kafka broker (#18030)
Reviewers: Josep Prat <josep.prat@aiven.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-08 01:06:51 +08:00
Dejan Stojadinović f9215dae3b
KAFKA-12770 introduce `checkstyleVersion` gradle property (for overriding CheckStyle project-defined dependency version) (#10967)
Reviewers: Ken Huang <s7133700@gmail.com>, Luke Chen <showuon@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-02 21:14:30 +08:00
TengYao Chi 8be99f44dc
KAFKA-18097 Upgrade readme to include min JDK changes (#17948)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-28 05:23:17 +08:00
kevin-wu24 aa4782aea3
KAFKA-17576 Fix all references to kraft/server.properties to use reconfig-server.properties (#17567)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-08 03:58:21 +08:00
Ted Yan bc3e6369b9
KAFKA-17931 Revise the `specifying-test-retries` section in README (#17679)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-06 11:09:09 +08:00
TaiJuWu 3e093062d2
MINOR: Add an instruction to run test with specific times (#17678)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-06 10:49:37 +08:00
Ken Huang e01f6a5c1e
KAFKA-17740 Update Readme and documentation (#17435)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-18 10:54:02 +08:00
Chung, Ming-Yen 54e9d75a3f
KAFKA-17683 Remove Zookeeper from READMEs in 4.0 (#17354)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-17 11:48:04 +08:00
TengYao Chi 0e4eebe9c0
KAFKA-12895 Drop support for Scala 2.12 in Kafka 4.0 (#17313)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-07 01:34:38 +08:00
David Arthur d38a90df2b
KAFKA-17672 Run quarantined tests separately (#17329)
Introduce new quarantinedTest that excludes tests tagged with "flaky". Also introduce two new build parameters "maxQuarantineTestRetries" and "maxQuarantineTestRetryFailures".

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-06 14:09:24 +08:00
Omnia Ibrahim c2de7c5e54
MINOR: Clarify Spotless instructions in README.md (#16471)
Reviewers: Igor Soarez <soarez@apple.com>
2024-06-27 12:04:08 +01:00
gongxuanzhang 62e5cce184
KAFKA-10787 Update spotless version and remove support JDK8 (#16176)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-06-05 18:57:32 +08:00
gongxuanzhang 342e69192f
KAFKA-10787 Add import ordering checkstyle rule and configure an automatic formatter (#16097)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-06-03 04:02:07 +08:00
Cheng-Kai, Zhang ae44a08051
MINOR: add docker usage documentation link in README.md (#15600)
We have a detail usage guide for running Kafka in docker. However, it might be easy for people to miss it if they only scan through the README.

This PR add a basic example command for quick start and link directing users to the detailed usage guide

Reviewers: Luke Chen <showuon@gmail.com>
2024-03-27 11:11:09 +08:00
Cheng-Kai, Zhang b667e61ea7
KAFKA-16416 Use NetworkClientTest to replace RequestResponseTest to be the example of log4j output (#15596)
Reviewers: Kirk True <kirk@kirktrue.pro>, Chia-Ping Tsai <chia7712@gmail.com>
2024-03-27 01:06:47 +08:00
Ismael Juma 92a67e8571
Note that Java 11 support for broker and tools is deprecated for removal in 4.0 (#15236)
Reviewers: Divij Vaidya <diviv@amazon.com>
2024-01-19 14:08:07 -08:00
Ismael Juma a72056e20d
MINOR: Replace Java 20 with Java 21 in `README.md` (#14451)
Reviewers: Divij Vaidya <diviv@amazon.com>, Yash Mayya <yash.mayya@gmail.com>
2023-09-26 10:29:30 +02:00
Colin Patrick McCabe c7de30f38b
KAFKA-15183: Add more controller, loader, snapshot emitter metrics (#14010)
Implement some of the metrics from KIP-938: Add more metrics for
measuring KRaft performance.

Add these metrics to QuorumControllerMetrics:
    kafka.controller:type=KafkaController,name=TimedOutBrokerHeartbeatCount
    kafka.controller:type=KafkaController,name=EventQueueOperationsStartedCount
    kafka.controller:type=KafkaController,name=EventQueueOperationsTimedOutCount
    kafka.controller:type=KafkaController,name=NewActiveControllersCount

Create LoaderMetrics with these new metrics:
    kafka.server:type=MetadataLoader,name=CurrentMetadataVersion
    kafka.server:type=MetadataLoader,name=HandleLoadSnapshotCount

Create SnapshotEmitterMetrics with these new metrics:
    kafka.server:type=SnapshotEmitter,name=LatestSnapshotGeneratedBytes
    kafka.server:type=SnapshotEmitter,name=LatestSnapshotGeneratedAgeMs

Reviewers: Ron Dagostino <rndgstn@gmail.com>
2023-07-24 21:13:58 -07:00
Said Boudjelda 2e30dd894f
MINOR: add JDK 20 build support to README (#14061)
Adding the value 20 to the JDK version that can build Apache Kafka into README.md

Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-21 10:45:01 +02:00
Chia-Ping Tsai 3b5bb2f6a2
MINOR: use built-in "--rerun" to replace "-Prerun-tests" (#13343)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2023-03-06 10:53:49 +08:00
Ismael Juma 52bb677bbe
MINOR: Reuse gradle daemon for scala compilation by default (#12280)
The time time to compile was reduced from 5.3 seconds to 0.9 seconds by
changing the keep alive mode from `SESSION` to `DAEMON`. We change the
default to the latter and allow the former to be set via a `keepAliveMode`
property.

Also update the Jenkins build to use `keepAliveMode="session"` instead of
`--no-daemon`.

./gradlew compileTestScala -PkeepAliveMode="daemon" --info:

> Task :streams:streams-scala:compileTestScala
> Watching 928 directories to track changes
> Caching disabled for task ':streams:streams-scala:compileTestScala' because:
>   Build cache is disabled
> Task ':streams:streams-scala:compileTestScala' is not up-to-date because:
>   Input property 'source' file /home/ijuma/src/kafka/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/JoinedTest.scala has changed.
> Watching 920 directories to track changes
> Watching 919 directories to track changes
> Compiling with Zinc Scala compiler.
> Prepared Zinc Scala inputs: 0.004 secs
> compiling 16 Scala sources to /home/ijuma/src/kafka/streams/streams-scala/build/classes/scala/test ...
> done compiling
> Completed Scala compilation: 0.925 secs

./gradlew compileTestScala -PkeepAliveMode="session" --info

> Task :streams:streams-scala:compileTestScala
> Watching 928 directories to track changes
> Caching disabled for task ':streams:streams-scala:compileTestScala' because:
>   Build cache is disabled
> Task ':streams:streams-scala:compileTestScala' is not up-to-date because:
>   Input property 'source' file /home/ijuma/src/kafka/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/JoinedTest.scala has changed.
> Watching 920 directories to track changes
> Watching 919 directories to track changes
> Starting process 'Gradle Worker Daemon 3'. Working directory: /home/ijuma/.gradle/workers Command: /usr/java/jdk-17.0.4.1+1/bin/java -Xss4m -XX:+UseParallelGC --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.file=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.util.stream=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED @/home/ijuma/.gradle/.tmp/gradle-worker-classpath3305983246500958050txt -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Worker Daemon 3'
> Successfully started process 'Gradle Worker Daemon 3'
> Started Gradle worker daemon (0.244 secs) with fork options DaemonForkOptions{executable=/usr/java/jdk-17.0.4.1+1/bin/java, minHeapSize=null, maxHeapSize=2048m, jvmArgs=[-Xss4m, -XX:+UseParallelGC, --add-opens=java.base/java.io=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/java.nio.file=ALL-UNNAMED, --add-opens=java.base/java.util=ALL-UNNAMED, --add-opens=java.base/java.util.concurrent=ALL-UNNAMED, --add-opens=java.base/java.util.regex=ALL-UNNAMED, --add-opens=java.base/java.util.stream=ALL-UNNAMED, --add-opens=java.base/java.text=ALL-UNNAMED, --add-opens=java.base/java.time=ALL-UNNAMED, --add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED], keepAliveMode=SESSION}.
> Compiling with Zinc Scala compiler.
> Prepared Zinc Scala inputs: 0.187 secs
> compiling 16 Scala sources to /home/ijuma/src/kafka/streams/streams-scala/build/classes/scala/test ...
> done compiling
> Completed Scala compilation: 5.307 secs

See https://github.com/gradle/gradle/issues/20579 for more details.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2022-12-01 05:33:43 -08:00
Lucas Brutschy 7dcaec4a79
MINOR: Fix usage instruction of skipSigning build parameter (#12731)
skipSigning parameter must be set to a boolean value to work.

Reviewers: Bill Bejeck <bbejeck@apache.org>
2022-10-24 11:55:48 -04:00
Ismael Juma 2e0f9f42dd
MINOR: Inline "Running a Kafka broker in KRaft mode" (#12750)
Also moved KRaft mode above zk mode.

Reviewers: Mickael Maison <mimaison@users.noreply.github.com>
2022-10-18 06:12:25 -07:00
José Armando García Sancio e8e815b1b6
MINOR; Update documentation for printing dependencies (#12610)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2022-10-17 11:27:49 -07:00
John Roesler 322a065b90
KAFKA-13714: Fix cache flush position (#11926)
The caching store layers were passing down writes into lower store layers upon eviction, but not setting the context to the evicted records' context. Instead, the context was from whatever unrelated record was being processed at the time.

Reviewers: Matthias J. Sax <mjsax@apache.org>
2022-03-23 22:09:05 -05:00
John Roesler dcd09de1ed
MINOR: Clarify how to publish specific projects to the local repo (#11938)
The current README instruction for local publishing boils the ocean by building and installing every jar in the project with both 2.12 and 2.13. While that is some times what people want to do, they are also often trying to just build a specific jar.

Reviewers: Bill Bejeck <bbejeck@apache.org>
2022-03-23 13:07:02 -05:00
Kamal Chandraprakash 496aa1f84b
MINOR: Provide valid examples in README page. (#10259)
* MINOR: Provide valid examples in README page.

- `testMetadataUpdateWaitTime` method is removed from MetadataTest class.
-  Removed the travis CI documentation.

Reviewers: Luke Chen <showuon@gmail.com>
2022-02-21 14:48:24 +08:00
Ismael Juma ca375d8004
MINOR: Reduce scala compilation time by 15% via scalac backend parallelism (#11739)
Introduce `maxScalacThreads` and set the default to the lowest of `8`
and the number of processors available to the JVM. The number `8` was
picked empirically, the sweet spot is between 6 and 10.

On my desktop, `./gradlew clean core:compileScala core:compileTestScala`
improved from around 60s to 51s ( with this change.

While at it, we improve the build output to include more useful
information at the start: build id, max parallel forks, max scala
threads and max test retries.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, Sean Li
2022-02-08 11:03:19 -08:00
Dmitriy Fishman 14671e28d7
MINOR: Fix typo in README.md (#11407)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2021-10-18 10:19:05 +02:00
Ismael Juma 0118330103
KAFKA-13273: Add support for Java 17 (#11296)
Java 17 is at release candidate stage and it will be a LTS release once
it's out (previous LTS release was Java 11).

Details:
* Replace Java 16 with Java 17 in Jenkins and Readme.
* Replace `--illegal-access=permit` (which was removed from Java 17)
   with  `--add-opens` for the packages we require internal access to.
   Filed KAFKA-13275 for updating the tests not to require `--add-opens`
   (where possible).
* Update `release.py` to use JDK8. and JDK 17 (instead of JDK 8 and JDK 15).
* Removed all but one Streams test from `testsToExclude`. The
   Connect test exclusion list remains the same.
* Add notable change to upgrade.html
* Upgrade to Gradle 7.2 as it's required for proper Java 17 support.
* Upgrade mockito to 3.12.4 for better Java 17 support.
* Adjusted `KafkaRaftClientTest` and `QuorumStateTest` not to require
   private access to `jdk.internal.util.random`.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2021-09-06 08:55:52 -07:00
Manikumar Reddy c807980088
MINOR: Update `./gradlew allDepInsight` example in README (#11125)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2021-07-25 21:05:27 +05:30
Ismael Juma fd66db4793
KAFKA-12930,KAFKA-12929: Deprecate Java 8 and Scala 2.12 (#11059)
Update the readme to note the deprecation. We will also mention the deprecation
in the downloads page when the release is done.

Reviewers: Konstantine Karantasis <konstantine@confluent.io>, David Jacot <djacot@confluent.io>, José Armando García Sancio <jsancio@users.noreply.github.com>
2021-07-15 15:29:18 -07:00
Ismael Juma 855011f92a
MINOR: Upgrade Gradle to 7.1.1 and remove JDK 15 build (#10968)
Gradle 7.1 improves Java incremental compilation:
https://docs.gradle.org/7.1.1/release-notes.html

We previously kept the JDK 15 build because some
tests didn't work with JDK 16. Since then, a number
of PRs were submitted to fix this so it's best
to remove the JDK 15 build before we create the
3.0 release branch.

Finally bump `test-retry` gradle plugin version too.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Luke Chen <showuon@gmail.com>
2021-07-04 10:55:16 -07:00
Ismael Juma 13ffebe2f1
MINOR: Update jacoco to 0.8.7 for JDK 16 support (#10654)
Details:
* https://github.com/jacoco/jacoco/releases/tag/v0.8.6
* https://github.com/jacoco/jacoco/releases/tag/v0.8.7

Ran `./gradlew clients:reportCoverage -PenableTestCoverage=true -Dorg.gradle.parallel=false`
successfully with Java 15 (see https://github.com/gradle/gradle/issues/15730 and
https://github.com/scoverage/gradle-scoverage/issues/150 for the reason why 
`-Dorg.gradle.parallel=false` is required).

Also updated `README.md` to include `-Dorg.gradle.parallel=false` alongside `reportCoverage`.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2021-05-12 08:13:03 -07:00