-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 quarkus.liquibase.secure-parsing to allow disabling secure parsing #47186
Conversation
try (Liquibase liquibase = liquibaseFactory.createLiquibase()) { | ||
// TODO: this will fail as the system property is not enforced | ||
// List<ChangeSetStatus> status = liquibase.getChangeSetStatuses(liquibaseFactory.createContexts(), | ||
// liquibaseFactory.createLabels()); | ||
// assertNotNull(status); | ||
// assertEquals(1, status.size()); | ||
// assertEquals("id-1", status.get(0).getChangeSet().getId()); | ||
// assertFalse(status.get(0).getWillRun()); | ||
} | ||
} |
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.
@geoand this part is annoying: the way you did it with ResettableSystemProperties
is appealing but it's also quite fragile as, while it works for the operations we are executing ourselves (because we set and restore the properties manually), it doesn't work for this piece of code for instance as the system properties are not set. Any operation you will perform manually will fail if you don't set and restore the system properties yourself.
I think we have two options here:
- wrap
Liquibase
with something that will set and restore the system properties. Given people are supposed to usetry with resource
, it could make sense as people are supposed to close the instance - if and only if you don't use several instances with different config at the same time but I don't see why you would do that - make the config global and not datasource related and set it once and for all from the start. That's what you get when using
-D...
Interested in your feedback before I pursue this further.
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.
Oh, now I see that we are actually mentioning the use of LiquibaseFactory in the docs. In that case, I think the first option makes sense.
This comment has been minimized.
This comment has been minimized.
🎊 PR Preview 4c5720e has been successfully built and deployed to https://quarkus-pr-main-47186-preview.surge.sh/version/main/guides/
|
16d5498
to
3b5fc9d
Compare
3b5fc9d
to
1f45299
Compare
@geoand things should be good, now. |
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.
Very nice!
Status for workflow
|
Status for workflow
|
Fixes #47101