-
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
dbms-specific changes cause checksum mismatch for unknown reasons on 4.21.0+ #4665
Comments
@chadlwilson - the Liquibase team updated the checksum calculation in Liquibase 4.22.0. In Liquibase 4.23.0, they added logic to auto-upgrade the checksums so the upgrade is transparent to people using the Maven, CLI interfaces and the primary direct Java interface. So, if you are using the command framework in the direct Java interface, it should work correctly. If you don't use it, then you will need to add the code that performs the auto-update to the new checksum version. Here is the page with the details on updating your code (if needed): |
If that were the problem, would it not complain about every change set rather than 2 specific ones? Also note that the checksum version in the error message is V8. I understand it doesn't blindly upgrade checksum versions if they do not match with the old version checksums, so I think it's not due to checksum upgrade. There's nothing special being done here, only |
Hi @kevin-atx - I commented above that I don't believe this issue is related to the checksum migration since it was failing in earlier releases also and for V8 checksums which no longer match how they were applied by Liquibase 4.20 and earlier. Let me know if there is additional info needed. |
I see the same problem in our code base. We are currently at version 4.21.1 and cannot upgrade to version 4.23.2 because we are getting some checksum errors. The error only occurs with change sets with type |
Seems similar to #4457 . The common thing I see is that those changes have the |
Yes I can confirm. This only affects, changesets which contains a |
For me too, it seems We don't have any changesets that are I've also only actually specifically validated these failures when trying to apply against Could be the same as #4457 I guess. Can't recall why I felt my case was different to #4457 when opening the issue separately here now - but maybe it was the separate discussion on variable replacement , which we are not actually using or that the linked PR hadn't fixed this for us in |
For what it's worth, GoCD is an open-source product so you can see the entire changesets in the repo linked above, if necessary. The other workarounds in comments on #4457 seemed not appropriate, as GoCD is a packaged open-source product which manages database migrations for users installing in their own environments on start-up; so I can't easily suggest workarounds/hacks to regenerate checksums for users to apply - they may also have strictly controlled environments without direct DB access and force-regenerating checksums sounds rather risky from a support perspective given disparate database deployments and environments of users. I'd have to automate that for users pre-migration, and then maintain that code until the end of time to support version upgrades from an arbitrary point in the product history, which is not really realistic/desirable. |
You are right. For 4.21.1 the problem was createProcedure. I downloaded gocd scripts and if I remove only that everything works. Now going from 4.20.0 or 4.21.1 to 4.23.x it always fails at change 107, having the createProcedure or not - so the current problem is for the dbms flag. |
@chadlwilson are you able to test if the artifacts from PR #4995 fix it for you? |
Hello @filipelautert - thanks for the effort here! I can confirm that
The checksums are upgraded to v9 on apply with no obvious issues. 🎉 |
Search first
Description
Similar to #4156 and #4457, checksum calculations seem broken for me on multiple changeSets in
4.23.1
,4.23.2
(and4.21.1
although I skipped that due to #4156). While similar to these earlier issues, they seem different.I've no idea what the cause is, but two different files break.
https://github.com/gocd/gocd/blob/0f58107c851cf2df6ce7c6902eebde796dc1f742/db-support/db-migration/src/main/resources/db-migration-scripts/initial/initialize.xml#L18-L27
https://github.com/gocd/gocd/blob/0f58107c851cf2df6ce7c6902eebde796dc1f742/db-support/db-migration/src/main/resources/db-migration-scripts/initial/create-trigger.xml#L18-L58
Steps To Reproduce
4.20.0
(with an H2 database, although not sure that matters, as one error is for a postgresql only changeset).4.23.2
I can possibly provide an easier reproducer (if this seems is not obviously a duplicate of another issue that I have missed).
Expected/Desired Behavior
Should be able to upgrade existing database.
Liquibase Version
4.21.1, 4.23.1, 4.23.2 (fail on all of these)
Database Vendor & Version
H2 1.4.200
Liquibase Integration
Direct java integration
Liquibase Extensions
none
OS and/or Infrastructure Type/Provider
MacOS Ventura
Additional Context
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: