Skip to content

Commit 2bf401c

Browse files
committed
Use kafka-topics instead of kafka-topics.sh
Replace calls to kafka-topics.sh with kafka-topics in CI workflows and the Docker Compose healthcheck. Updated .github/workflows/maven-ci.yml, .github/workflows/maven-pr-builder.yml, and microservices-messaging/docker-compose.yml to use the kafka-topics binary for readiness checks and healthchecks. This prevents failures on images that expose the kafka-topics command without the .sh wrapper.
1 parent e59783d commit 2bf401c

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/maven-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Wait for Kafka Readiness
4949
run: |
5050
retry=0
51-
until docker exec kafka-messaging-demo kafka-topics.sh --bootstrap-server localhost:9092 --list 2>/dev/null || [ $retry -eq 20 ]; do
51+
until docker exec kafka-messaging-demo kafka-topics --bootstrap-server localhost:9092 --list 2>/dev/null || [ $retry -eq 20 ]; do
5252
echo "[INFO] Waiting for Kafka to become ready on port 9092..."
5353
sleep 2
5454
retry=$((retry+1))

.github/workflows/maven-pr-builder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: Wait for Kafka Readiness
4141
run: |
4242
retry=0
43-
until docker exec kafka-messaging-demo kafka-topics.sh --bootstrap-server localhost:9092 --list 2>/dev/null || [ $retry -eq 20 ]; do
43+
until docker exec kafka-messaging-demo kafka-topics --bootstrap-server localhost:9092 --list 2>/dev/null || [ $retry -eq 20 ]; do
4444
echo "[INFO] Waiting for Kafka to become ready on port 9092..."
4545
sleep 2
4646
retry=$((retry+1))

microservices-messaging/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ services:
4747
KAFKA_LOG_DIRS: '/tmp/kraft-combined-logs'
4848
CLUSTER_ID: 'MkU3OEVBNTcwNTJENDM2Qk'
4949
healthcheck:
50-
test: ["CMD-SHELL", "kafka-topics.sh --bootstrap-server localhost:9092 --list"]
50+
test: ["CMD-SHELL", "kafka-topics --bootstrap-server localhost:9092 --list"]
5151
interval: 5s
5252
timeout: 10s
5353
retries: 5

0 commit comments

Comments
 (0)