build(deps): Kafka client 4.2.0 upgrade#19441
Conversation
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.kafka</groupId> |
There was a problem hiding this comment.
Druid only ever depended on it from test scope, and only because TestBroker needed kafka.server.KafkaServer. Once TestBroker is gone, nothing imports anything from kafka.* (Scala namespace)
| import org.apache.druid.indexing.kafka.KafkaIndexTaskTuningConfig; | ||
| import org.apache.druid.indexing.kafka.KafkaRecordSupplier; | ||
| import org.apache.druid.indexing.kafka.test.TestBroker; | ||
| import org.apache.druid.indexing.kafka.test.EmbeddedKafkaBroker; |
There was a problem hiding this comment.
TestBroker no longer compiles (Scala kafka.server.KafkaServer removed in Kafka 4.0); embedded ZooKeeper mode no longer supported by Kafka 4.x brokers.
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.curator</groupId> |
There was a problem hiding this comment.
this was only used to embed ZooKeeper for TestBroker/TestKafkaExtractionCluster; KRaft mode means no ZooKeeper.
| </dependency> | ||
| <dependency> | ||
| <groupId>org.testcontainers</groupId> | ||
| <artifactId>testcontainers-kafka</artifactId> |
There was a problem hiding this comment.
kafka container specific - that will help in integration testing and running containers
| @BeforeClass | ||
| public static void setupClass() throws Exception | ||
| { | ||
| zkServer = new TestingCluster(1); |
There was a problem hiding this comment.
KRaft mode - hence no zk
|
This will be the first step to improve & simplify the kafka integration testing , version upgrade to open the path for Queue Semantics Kafka Ingestion #19311 |
| { | ||
| final String url = getBootstrapServerUrl(); | ||
| final int colon = url.lastIndexOf(':'); | ||
| return Integer.parseInt(url.substring(colon + 1)); |
|
It looks like a flaky test failure https://github.com/apache/druid/actions/runs/25607936768/job/75172943327?pr=19441 |
|
Please help in triggering the failing CI checks again. |
FrankChen021
left a comment
There was a problem hiding this comment.
I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.
Reviewed 14 of 14 changed files.
This is an automated review by Codex GPT-5.5
|
please check the error of this check: Static Checks CI / strict-compilation / strict-compilation (pull_request)Failing after 39m |
|
@FrankChen021 thanks for checking, CI checks are looking good now. Once we have these changes ready the Queue implementation of phase 1 will be easier to review. |
53afc19 to
0f669b7
Compare
|
Please re-run the CI check https://github.com/apache/druid/actions/runs/25716029780/job/75506218870?pr=19441 - it is not looking related to our changes. |
FrankChen021
left a comment
There was a problem hiding this comment.
I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.
Reviewed 14 of 14 changed files.
This is an automated review by Codex GPT-5.5
Ref #19322
Description
Release note
Upgraded the bundled Apache Kafka client and broker dependencies from 3.9.2 to 4.2.0; embedded test brokers now run on Testcontainers (
apache/kafka:4.2.0) instead of the removed Scala/ZooKeeper-mode broker.Key changed/added classes in this PR
pom.xml:apache.kafka.version→4.2.0.New
EmbeddedKafkaBrokertest helper backed by Testcontainers.Migrated
KafkaIndexTaskTest,KafkaRecordSupplierTest,KafkaSamplerSpecTest,KafkaSupervisorTest,KafkaStringHeaderFormatTest, andTestKafkaExtractionClusteroff the legacyTestBroker/ embedded ZooKeeper.Deleted
TestBroker; removedkafka_2.13,curator-test, andscala-librarytest dependencies.KafkaResourceDocker image bumped toapache/kafka:4.2.0.This PR has: