From eb221b0448485cb3c193c14d053d2b9903b6c1b0 Mon Sep 17 00:00:00 2001 From: Ozan Gunalp Date: Mon, 28 Feb 2022 10:59:20 +0300 Subject: [PATCH] Remove redpanda image name check. Fixes #23978 --- .../deployment/DevServicesKafkaProcessor.java | 4 ---- .../client/deployment/RedPandaKafkaContainer.java | 14 +++++--------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/DevServicesKafkaProcessor.java b/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/DevServicesKafkaProcessor.java index 2ce80507699e9..6e603d381bdde 100644 --- a/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/DevServicesKafkaProcessor.java +++ b/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/DevServicesKafkaProcessor.java @@ -11,7 +11,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.function.Supplier; -import java.util.regex.Pattern; import java.util.stream.Collectors; import org.apache.kafka.clients.admin.AdminClient; @@ -53,9 +52,6 @@ public class DevServicesKafkaProcessor { private static final Logger log = Logger.getLogger(DevServicesKafkaProcessor.class); private static final String KAFKA_BOOTSTRAP_SERVERS = "kafka.bootstrap.servers"; - private static final Pattern STRIMZI_IMAGE_NAME_PATTERN = Pattern - .compile("(^.*test-container):(\\d+\\.\\d+\\.\\d+|latest)-kafka-(.*)$"); - /** * Label to add to shared Dev Service for Kafka running in containers. * This allows other applications to discover the running service and use it instead of starting a new instance. diff --git a/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/RedPandaKafkaContainer.java b/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/RedPandaKafkaContainer.java index d7d9881d1c776..02f3179f02a8f 100644 --- a/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/RedPandaKafkaContainer.java +++ b/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/RedPandaKafkaContainer.java @@ -39,15 +39,11 @@ final class RedPandaKafkaContainer extends GenericContainer { - cmd.withEntrypoint("sh"); - }); - withCommand("-c", "while [ ! -f " + STARTER_SCRIPT + " ]; do sleep 0.1; done; " + STARTER_SCRIPT); - waitingFor(Wait.forLogMessage(".*Started Kafka API server.*", 1)); - } else { - throw new IllegalArgumentException("Only vectorized/redpanda images are supported"); - } + withCreateContainerCmdModifier(cmd -> { + cmd.withEntrypoint("sh"); + }); + withCommand("-c", "while [ ! -f " + STARTER_SCRIPT + " ]; do sleep 0.1; done; " + STARTER_SCRIPT); + waitingFor(Wait.forLogMessage(".*Started Kafka API server.*", 1)); } @Override