quarkusio / quarkus

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

Explicit quarkus.datasource.devservices.enabled=true makes devservices restart DB container on live reload #30390

Closed plevart closed 1 year ago

plevart commented 1 year ago

Describe the bug

Dev mode restarts database (mysql) container on liver reload when there's an explicit property in application.properties:

quarkus.datasource.devservices.enabled=true

When there's no such explicit property (the default value true doesn't count), database container is not restarted on live reload.

Expected behavior

No restart is expected always.

Actual behavior

DB container is restarted and data is lost after live reload.

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

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

No response

Additional information

Here's a debug session when live reload triggers container restart (class DevServicesDatasourceProcessor):

image (1)

..the cachedProperties at that time only contains the following two entries:

image (2)

quarkus-bot[bot] commented 1 year ago

/cc @geoand (devservices), @stuartwdouglas (devservices)

geoand commented 1 year ago

@plevart it seems like you have done some nice investigation work. Do you perhaps have a fix in the works?

plevart commented 1 year ago

I think @alesj is volunteering to fix this. Right @alesj ?

alesj commented 1 year ago

Yeah, just assigned it to myself ... but need to finish some gRPC work before.