quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.73k stars 2.67k forks source link

Fail to start-up Kafka dev services after https://github.com/quarkusio/quarkus/pull/29897 #29954

Closed afalhambra closed 1 year ago

afalhambra commented 1 year ago

Describe the bug

After https://github.com/quarkusio/quarkus/pull/29897/commits/0f3a9384a0da9ca149b40a4b88f8713fc0a80b46 our tests are failing[1] as I can see the default provider is set to redpanda for the quarkus.kafka.devservices.provider new property introduced.

However, in our test we don't have such property defined, but quarkus.kafka.devservices.image-name=quay.io/strimzi-test-container/test-container:0.100.0-kafka-3.1.0 instead. Thus test is failing, as default provider is redpanda but we are specifying an strimzi image.

Then, it fails to start up the kafka dev service.

[1] https://github.com/quarkus-qe/quarkus-test-suite/blob/main/messaging/kafka-streams-reactive-messaging/src/test/java/io/quarkus/ts/messaging/kafka/reactive/streams/DevModeStrimziKafkaStreamIT.java

Expected behavior

I would expect this change to be documented in the migration guide, as there might be some users already having this current setup described above.

Actual behavior

Unable to start up:

Could not start container: java.lang.IllegalStateException: Container exited with code 127
    at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:514)
    at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:344)
    at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
    at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:334)
    at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
    at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.lambda$startKafka$5(DevServicesKafkaProcessor.java:236)
    at java.base/java.util.Optional.orElseGet(Optional.java:364)
    at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafka(DevServicesKafkaProcessor.java:282)
    at io.quarkus.kafka.client.deployment.DevServicesKafkaProcessor.startKafkaDevService(DevServicesKafkaProcessor.java:95)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
    at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
    at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
    at java.base/java.lang.Thread.run(Thread.java:833)
    at org.jboss.threads.JBossThread.run(JBossThread.java:501)

How to Reproduce?

git clone -b kafka-devservices-provider git@github.com:afalhambra/code-with-quarkus.git
cd code-with-quarkus
mvn quarkus:dev

Output of uname -a or ver

Linux antferna.remote.csb 4.18.0-372.19.1.el8_6.x86_64 #1 SMP Mon Jul 18 11:14:02 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "17.0.5" 2022-10-18

GraalVM version (if different from Java)

No response

Quarkus version or git rev

Quarkus main

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

quarkus-bot[bot] commented 1 year ago

/cc @alesj(kafka), @cescoffier(kafka), @geoand(devservices), @ozangunalp(kafka), @stuartwdouglas(devservices)

ozangunalp commented 1 year ago

@afalhambra Indeed I'll add a section to the 2.16 migration guide.

ozangunalp commented 1 year ago

@afalhambra Thanks for the heads up. Here is the migration guide section : https://github.com/quarkusio/quarkus/wiki/Migration-Guide-2.16

afalhambra commented 1 year ago

Thanks @ozangunalp!