Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

liquibase Changeset Validation Failures left in broken state

Brian ShaverApr 29 2024

I'm using SQLcl 24.1 with embeded liquibase 4.25 trying to start using this tool for a fairly complicated application which uses many different schemas within the same database. I've got a privileged user “deploy” which I would like to use with a main controller.xml to deploy changes to all schemas sometimes in specific sequence as specified by the main controller.xml changelog.

Honestly I'm running into issues left and right, the most recent of which seems to leave me in a broken state. I can't fix a changeset which failed and run lb update again, and I can't run any lb rollback from this state either. So I think I'm stuck. Here is the error I get when trying to either update or rollback:

An error has occured:
liquibase.exception.ValidationFailedException: Validation Failed:
     10 changes have validation failures
          null, ../vsgnne_scr/table/scr_centerids_table.xml::f465948b70b64b39827e6642cb118f4704e5a761::(VSGNNE_SCR)-Generated
          null, ../vsgnne_scr/table/scr_fwpcontactids_table.xml::1538accaa16f04aabf5720099e6329c177a98410::(VSGNNE_SCR)-Generated
          null, ../vsgnne_scr/table/scr_groupids_table.xml::6d4589ce0398f650e96bcf17719481be13c69193::(VSGNNE_SCR)-Generated
          null, ../vsgnne_scr/table/scr_ltfids_table.xml::d59683424fe2ff3155b4f8c13402b7465fbbb7c0::(VSGNNE_SCR)-Generated
          null, ../vsgnne_scr/table/scr_patientids_table.xml::d53c5968aed219327f67b6b517a9c3c9a244059a::(VSGNNE_SCR)-Generated
          null, ../vsgnne_scr/table/scr_patientid_dates_table.xml::a305e9bfc3425dee9da7dc096c16578f782bab2d::(VSGNNE_SCR)-Generated
          null, ../vsgnne_scr/table/scr_primprocids_table.xml::f389c72d41ff6e7591d5c10db745df54b55f47b9::(VSGNNE_SCR)-Generated
          null, ../vsgnne_scr/table/scr_proids_table.xml::60f9e793f53625755d8b1de7b0eaebbb68b724a4::(VSGNNE_SCR)-Generated
          null, ../vsgnne_scr/table/scr_setids_table.xml::95702f6dc27143a9980303dac38c0b4255c07eae::(VSGNNE_SCR)-Generated
          null, ../vsgnne_scr/table/scr_userids_table.xml::78fe655cdee39776edf64d914b72b99836300137::(VSGNNE_SCR)-Generated

It does not tell me that these validation failures are checksum related, but that is the only type of validation failure I've been able to find on the internet. And adding -debug and -log does not show any additional information as far as I can tell.

I'm wondering if the null in the above output is supposed to be some specific error message.

I could drop and rebuild this schema again from scratch, but I should not be getting stuck like this from making or correcting simple typos in changesets. Here is the result of the previous lb update which ran ok until it hit a typo in my changeset.

SQL> > lb update -chf ../vsgnne_scr/changelogs/create_vsgnne_scr_schema.xml -desn vsgnne_scr -ouds t
rue -lbsn deploy -log -debug
...
UPDATE SUMMARY
Run:                         22
Previously run:               1
Filtered out:                 0
-------------------------------
Total change sets:           23

An error has occured:
liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for changeset ../vsgnne_scr/changelogs/create_vsgnne_scr_schema.xml::create_vsgnne_scr_schema_grants::brian.shaver:
     Reason: liquibase.exception.DatabaseException: ORA-00942: table or view does not exist
 [Failed SQL: (942) grant select,update,delete,insert on vsgnne_src.scr_setids to scramble]

After I fix the error, I try to run again the lb update command above … and now I get validation failures.

I try to rollback … the same.

I unfix the error which caused the original failure, and try again update and rollback … same result.

I've confirmed using lb cac the checksums for these changesets have not changed, they still match what it is in the DATABASESCHANGELOG table.

Any suggestions other than to drop it all and start over hoping to not run into this problem the next time?

Thanks!

Comments
Post Details
Added on Apr 29 2024
0 comments
1,465 views