-
Notifications
You must be signed in to change notification settings - Fork 1.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 ConfiguredValueModifier extension point for plugins #2252
Add ConfiguredValueModifier extension point for plugins #2252
Conversation
7e6d934
to
b95ae64
Compare
Signed-off-by: Derek Smart <derek@grindaga.com>
b95ae64
to
b59e0cb
Compare
Rebased and updated test:
|
…m/mcred/liquibase into mcred-feature/configured-value-modifier
…o getCurrentConfiguredValue()
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.
I made some changes to your original PR:
- I moved the logic of applying the modifier into LiquibiseConfiguration which is the more "root" spot. That should make it be applied everywhere better
- I renamed ConfiguredValueModifier's getPriority() method to getOrder() since it's not really the "replacing" logic we use for plugins but an "order" like in CommandStep. Related to that, I made the factory not implement PluginFactory since it's not using the normal plugin replacement logic.
- I made ConfiguredValueModifier's logic be based around being another "override" spot vs. replacing values. I think that will work better with the tracking and logic we have around "nested" values.
Notes and test results: Things to be aware of
Things to worry about
|
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.
PR allows Liquibase extensions to modify configuration values based on a ordering (or priority) set by the extension.
- Code used by extension developers; no impact on Liquibase users beyond those using extensions that take advantage of this enhancement.
- New unit tests added.
- No additional testing required.
APPROVED
Functional Tests
Passing Test Harness Execution
NOTE: Test failures in the functional test suite are due to mismatch in expected console output and actual console output for the checks feature. These are unrelated to the changes in this PR and can be disregarded.
Environment: All OS
Liquibase Version: 4.6.1 +
Liquibase Integration & Version: CLI
Pull Request Type
Description
Extensions should be able to modify the value of a property directly based on a loaded priority. Example: the value for a url in the properties file could be a placeholder and the extension should replace that value during runtime.
Testing
I was not able to get all of the unit tests to pass prior to developing this plugin, but the additional tests for ConfiguredValueTest pass and the existing tests for that class continue to pass.
Fast Track PR Acceptance Checklist:
Need Help?
Come chat with us on our discord channel