-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a property to disable liquibase for selected data sources at build time #42225
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice patch! I think this looks a lot more like enabled
than active
even if it can be a bit blurry.
We ended up with the following convention:
enabled
is build time and disables the feature entirely (can be per PU though)active
is runtime and you can use it to enable/disable the feature at runtime
Preventing the merge until we figure this out.
/cc @yrodiere to make sure it applies in this case as he came up with the convention :)
I was actually writing a new issue about this, because while working on similar features I encountered inconsistencies in existing configuration. There may be a few things to discuss. In the meantime, to allow this PR to move forward, I'd recommend the following:
|
The property needs to be evaluated at build time, to prevent the unsuccessful attempt to include non-existing changelogs in the native image. Using We could rename the property to something else, like Please also see my comments in #27437. |
That's not a great name, but I wonder if we shouldn't rename the existing property to |
Wait a minute, we probably don't really have a conflict if we straighten things up. The existing I would propose we straight up remove the existing This would be a breaking change, but one that we need IMO. What worries me is the potential loss of data, so maybe we'll need a temporary workaround... We could for example:
If a runtime setting is needed, we could introduce |
From a naming perspective this would be the ideal solution, albeit we'd need to make There is the discrepancy between a jvm and a native build to keep in mind. The jvm build doesn't care if the resources (in this case change logs) are available at build time (probably because they could be set later via environment variable). The native build on the other hand fails if the resources aren't available to be included in the native image. That's why we need some possibility, to disregard chosen data sources at build time. When choosing the route of repurposing the
After the transitional period |
See #42244 |
O.K. We'll proceed, when a consensus in #42244 arises. |
Fixes #27437
This PR adds a build time configuration property
quarkus.liquibase.active
and accordinglyquarkus.liquibase."named-data-sources".active
.It enables users to deactivate liquibase at build time for data sources which don't need migration.
The PR also contains some minor brush ups of existing code.
Are there any documentation tasks, that should be addressed in the context of this PR?