-
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
Introduce support for primitive types in new changes #5360
Introduce support for primitive types in new changes #5360
Conversation
0d130be
to
c492fe2
Compare
liquibase-standard/src/test/java/com/example/liquibase/change/ChangeWithPrimitiveFields.java
Fixed
Show resolved
Hide resolved
ced80a0
to
064ebe4
Compare
liquibase-standard/src/test/java/com/example/liquibase/change/ChangeWithPrimitiveFields.java
Fixed
Show fixed
Hide fixed
Hi @fbiville , could you please take a look at the unit test failures in this link: https://github.com/liquibase/liquibase/actions/runs/7265842115/job/19796976554?pr=5360? Your assistance in resolving them would be greatly appreciated. Thank you! |
Hi @fbiville, I have fixed some unit tests that were failing and made some changes to some tests that were not running all the scenarios specified in the Test error:
Thanks, |
Hello, I'm back from vacation, I will have a look now. |
- Removed PrimitiveSetterChange inner class and use ChangeWithPrimitiveFields one instead. - Trivial spock test clean up.
0cfc555
to
dbc3822
Compare
@MalloD12 I cannot reproduce the issue, the |
Hi @fbiville, Same here, I cannot reproduce that issue locally either (but that's because I'm on a Mac) I'll ask someone from the team for some assistance trying to reproduce this issue. I do have not a clear understanding of why that test is failing, or what is the relationship between the type returned by Thanks, |
This prevents the change from leaking to other tests
As discussed on Slack, it turns out the issue came from the fact that the test I added registered a custom change but did not unregister it when the test ended, which had the unwanted effect of keeping that specific change available for other tests. |
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.
Approved.
Code changes look good to me. Thank you @fbiville for this PR and fixing up the last failing test.
Build and most of the test checks have been successfully executed, except for the functional test suite failing for a known issue when downloading artifacts.
Impact
Description
This adds support for primitive types, particularly for custom change fields.
Things to be aware of
It could potentially change the converted value type of existing changes, but that's unlikely as the modified function only returns primitive types if explicitly requested.
Since such requests would fail in the past, I doubt this change will have an impact.
Things to worry about
Changing existing
Change
subclasses to migrate from boxed types to primitive types is likely a bad idea since it may change the generated check sum.The general change proposed here is however useful for new changes.
Additional Context
N/A