quarkusio / quarkus

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

Setting quarkus.redis.devservices.enabled to false does not work #19599

Closed malkochoglu closed 3 years ago

malkochoglu commented 3 years ago

Describe the bug

Hi, Although I set quarkus.redis.devservices.enabled to false, looks like still redis database is tried to be started using docker and start up time goes up to 100 secs in a hello world application. Though, this does not prevent redis client connect to configured database on localhost.

application.properties quarkus.redis.devservices.enabled=false

console log Unable to connect to DOCKER_HOST URI tcp://192.168.XX.XXX:2376, make sure docker is running on the specified host

2021-08-23 22:01:16,068 WARN [io.qua.dep.IsDockerWorking] (main) Unable to connect to DOCKER_HOST URI tcp://192.168.99.100:2376, make sure docker is running on the specified host 2021-08-23 22:02:34,924 INFO [io.quarkus] (Quarkus Main Thread) code-with-quarkus 1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.1.3.Final) started in 101.368s. Listening on: http://localhost:8080 2021-08-23 22:02:34,929 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. 2021-08-23 22:02:34,931 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [agroal, cdi, hibernate-orm, jdbc-mysql, narayana-jta, redis-client, resteasy, resteasy-jackson, smallrye-context-propagation, vertx]

I removed all redis client dependencies and code, left only a simple rest endpoint, I did not see above log happen and start up time was around 1 sec as I expected

Expected behavior

Skip invoking a redis database using docker.

Actual behavior

Run docker to invoke a redis db

How to Reproduce?

  1. Set up local or connect to remote redis
  2. Add redis client to gradle.properties
  3. Add quarkus.redis.devservices.enabled=false in application.properties
  4. Add redis config details of an existing redis db
  5. Run the application on IntelliJ using gradle's quarkusDev task

Output of uname -a or ver

Microsoft Windows [Version 10.0.19043.1165]

Output of java -version

openjdk version "14.0.1" 2020-04-14

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.1.1.Final, 2.1.3.Final and 2.2.0.CR1

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

Gradle 6.9

Additional information

No response

quarkus-bot[bot] commented 3 years ago

/cc @cescoffier, @gsmet, @machi1990, @stuartwdouglas

machi1990 commented 3 years ago

Thank you for reporting the issue. I'd imagine you do not have docker running, correct? Hence the 100s startup time.

@stuartwdouglas the check is done on the build step: https://github.com/quarkusio/quarkus/blob/main/extensions/redis-client/deployment/src/main/java/io/quarkus/redis/client/deployment/DevServicesRedisProcessor.java#L59 I wondering if it will make more sense to perform the check here: https://github.com/quarkusio/quarkus/blob/main/extensions/redis-client/deployment/src/main/java/io/quarkus/redis/client/deployment/DevServicesRedisProcessor.java#L131? it will have to be done for all the redis clients.

malkochoglu commented 3 years ago

Hi, Thanks all for looking into this. I have docker desktop installed. However 'docker run' fails on windows command terminals. It's not configured. Only proper way is to use it on my laptop is in Linux shell provided by WSL functionality. I suggest, if the purpose of "quarkus.redis.devservices.enabled=false" is not to try running a local database, I think it should skip it altogether whether containers can be run locally or not or docker is properly configured or not.

Thank you.