-
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
Ensure backward-compatibility as part of the LiquibaseConfiguration API refactoring #1732
Comments
With the API changes we have to make, we aren't able to keep 100% compatibility with the existing code. In particular:
The other breaking API changes which could have a deprecated backwards-compatible functions/variables re-introduced:
Looking at our own extensions, as an example of how the existing configuration APIs are used:
Trying to find open source 3rd party code that uses the configuration API:
I checked the following repos and found no use of the configuration APIs:
Suggestion
Fixing 1 and 2 is straightforward to do and addresses the one 3rd party usage I found as well as 2 out of 3 of our extensions, so likely most people doing "normal" extension/integration stuff. By leaving 3 and 4 broken, it means that anyone doing more complex configuration usage like defining your own configuration subclasses or manipulating the configuration state will need to be updated to work with 4.4.0. But, I think that will be a small to empty set of users, and they will be getting into the "can't be 100% compatible regardless" point anyway so not worth working to fix part when it's not going to fully work anyway. 5 is something we could fix by renaming the new version of the public static properties to something like Thoughts? |
➤ Mario Champion commented: for future readers, i m good with nathan’s proposal for what we fix and dont (at least immediately) so comment if you have a different take. |
➤ Kevin Chappell commented: Nathan Voxland - could you add examples of 3, 4, and 5 above? I want us to figure out a way to maintain backward compatibility so we make it easy for everyone to use the new Liquibase version. |
➤ Mario Champion commented: Note: good to keep in mind that API compatibility and user compatibility are two different concerns. I keep forgetting to be specific enough. |
➤ Kevin Chappell commented: Nathan Voxland I believe that an extra week of time to maintain backward-compatibility is worth it. We have a significant problem with people not moving to new versions of Liquibase. Anything we can do to remove friction and make it safe and seamless to adopt the latest version is worth it. We’ve seen improvements to Hub signups from removing friction. I suspect we’ll see the same here, if we do it well. |
➤ Mario Champion commented: very much agree if it is like a week, or even more. our one week, versus people being stuck, is worth it. |
Because we moved liquibase.configuration.GlobalConfiguration to liquibase.GlobalConfiguration, I was able to keep the new definitions as liquibase.GlobalConfiguration.OUTPUT_ENCODING etc. without adding the _DEF suffix, since the deprecated string versions are on liquibase.configuration.GlobalConfiguration and they are both static |
All the compatibility support should be in #1776 along side the overall refactoring work. |
➤ Erzsebet Carmean commented: All functional tests passed on the Liquibase internal Jenkins server. Thanks, Nathan Voxland! Moving to ready to merge. |
➤ Erzsebet Carmean commented: Moving back to UAT. The ticket is getting whiplash! CC:: Mario Champion, Nehal Dixit |
➤ Nehal Dixit commented: Does UAT-ing this ticket cause any issues or blockers? Mike Olivas Tsvi Zandany ?? |
➤ Mike Olivas commented: I just downloaded the #14 build and replaced my liquibase 431 with 4.4.0-SNAPSHOT build. C:\Users\Administrator\git\CyclopsBI\Liquibase>liquibase history _ _ _ _| | () () || | _ __ _ _ _ | |_ __ _ ___ ___| | | |/ _
|
➤ Nehal Dixit commented: UAT failed moving it back into development |
➤ Mike Olivas commented: After fixing the driver and adding it to lib, the rest of the use cases went great. This code driver went fine! |
Overview
In #1691, we made a large refactoring to the liquibase.configuration package which will break API compatibility with anyone using the old version.
After the refactoring is complete, collect up the changes to the API and determine which should have deprecated methods re-introduced to provide compatibility with existing extensions and integrations.
Code that will remain backward compatible
Code that looks up fields via getter methods
Existing code that looks up "Configuration" classes and calls get methods to read those configurations will continue to work without change.
Example:
Code that calls configuration setter methods
We no longer have setXYZ methods on the Configuration objects. Instead, wanted values to get set on the scope.
Example:
We will introduce a new ConfigurationValueSource which has a singleton map and can be used to store values set this way. Values set in this way will override all other sources EXCEPT for the new Scope-based method which replaces this pattern.
Custom configuration definitions
Example:
Code that directly references the configuration's key name
Example:
Branch Policy
This compatibility work will be done in the LB-1222 branch.
The text was updated successfully, but these errors were encountered: