quarkusio / quarkus

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

`quarkus.liquibase.default-schema-name` fixed at build time #37649

Open An1s9n opened 10 months ago

An1s9n commented 10 months ago

Describe the bug

Starting with version 3.5.2 it looks like quarkus.liquibase.default-schema-name configuration property is fixed at build time when running in native mode. In 3.5.1 and below works as expected

Expected behavior

Native image is built with quarkus.liquibase.default-schema-name property set to public. When you run app with mentioned property overridden with foo then tables are created in foo schema

Actual behavior

Native image is built with quarkus.liquibase.default-schema-name property set to public. When you run app with mentioned property overridden with foo then tables are created in public schema, which is not expected

How to Reproduce?

To be added later if needed

Output of uname -a or ver

Darwin 192.168.1.51 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:28:45 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6020 arm64 (same behavior on our Linux server)

Output of java -version

openjdk version "17.0.7" 2023-04-18 LTS OpenJDK Runtime Environment Zulu17.42+19-CA (build 17.0.7+7-LTS) OpenJDK 64-Bit Server VM Zulu17.42+19-CA (build 17.0.7+7-LTS, mixed mode, sharing)

Mandrel or GraalVM version (if different from Java)

No response

Quarkus version or git rev

3.5.2

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

Gradle 8.5

Additional information

No response

quarkus-bot[bot] commented 10 months ago

/cc @Karm (mandrel), @andrejpetras (liquibase), @galderz (mandrel), @geoand (liquibase), @gsmet (liquibase), @zakkak (mandrel)

geoand commented 10 months ago

That's odd, I don't see any changes in the Liquibase extension itself.

If you can provide a simple project that reproduces the issue, it would be a great help in nailing down what causes this.

Thanks

An1s9n commented 10 months ago

Hi, @geoand! I've prepared a reproducer here

Let me also share my findings during reproducer preparation, hope it would help you to find the root of the problem

If I override property directly, for example quarkus.liquibase.default-schema-name then everything works fine. But if in resources/application.yaml I use a placeholder like this: quarkus.liquibase.default-schema-name: ${datasource.schema} and try to override datasource.schema then it fails

One more fact: I managed to reproduce it only with Gradle. Maven works just fine

Once again, all this starts with 3.5.2 version

geoand commented 10 months ago

One more fact: I managed to reproduce it only with Gradle. Maven works just fine Once again, all this starts with 3.5.2 version

Thanks!

@aloubyansky @radcortez are you aware of any Gradle and / or config changes that appeared in 3.5.2 that could have affected this?

radcortez commented 10 months ago

Maybe these are related?

https://github.com/quarkusio/quarkus/pull/37021 https://github.com/quarkusio/quarkus/issues/37273