Upgrade 2.7 Platform to Liquibase 4.26.0. Help needed!

Hello everyone, I need your help on why my tests fail here in this PR TRUNK-6208:Upgrade 2.7 Platform to Liquibase 4.26.0 by Seremba · Pull Request #4594 · openmrs/openmrs-core · GitHub. I tested the upgrade like this

  1. I cd into openmrs-core
  2. ran mvn clean install
  3. deleted the OpenMrs folder. On windows 11 it is in C:\Users\Admin\AppData\Roaming\OpenMRS
  4. then cd into openmrs-core/webapp
  5. ran mvn jetty:run
  6. went to http://localhost:8080/openmrs/initialsetup
  7. chose simple, entered my db password and it successfully created and updated the database. Is there anything I am doing wrong or I am meant do?

It is also important to share that there are breaking changes that were introduced especially in v4.13.0, v4.17.0 and 4.23.0 that impacted that I have tried to implement. However still the tests fail. Thanks a lot!

@dev3 @dev4 @dev5

Hey @seremba . Have you had a look at these release notes? Changeset Checksums

This is because i see some errors about changelog checksums in my first glimpse of the error logs on github actions

Thanks @mherman22, you must be right! Let me give this a try before I go to bed! Do you have any idea on how to test the database because mvn clean install doesn’t seem to help with database tests.

Have you tried deploying the war file in an openmrs platform sdk instance?

As for running those database tests, Doesn’t running then individually using the IDE capabilities work? Or something like mvn test -Dtest=[testname] -Dsurefire.failIfNoSpecifiedTests=false help?

I see mvn clean install --batch-mode && mvn test -Pskip-default-test -Pintegration-test --batch-mode --file pom.xml in the worlflows. It could work anyway :wink:

I have not yet tried the two. But Let me first finish working on the changelog checksums

1 Like

looks like I am making progress since I am getting different errors now! I am currently getting this error ERROR] Tests run: 18, Failures: 8, Errors: 0, Skipped: 0, Time elapsed: 106.0 s - Pastebin.com. I am following this guide. So I am inquiring, where do I get “all the existing frequencies and dosing units for existing drug orders in the database” on a new installation? Running SELECT DISTINCT frequency FROM drug_order WHERE frequency IS NOT NULL; returns Empty set (0.00 sec). Is there a way to get them on a new installation of OpenMRS or do I have to add them manually? @dkayiwa @mherman22 ?

When you do a new installation while using the previous version of liquibase, does the same sql statement return an empty set?

Yes. It returns an empty set!

Then your line of investigation should not be in the direction of where do I get all the existing frequencies and dosing units for existing drug orders in the database” on a new installation?

You must be right! However, thinking through it a little more, if it returns empty changeset, it means no drug orders in the database yet. So I don’t expect it to fail since the test is all about “existing drug order frequencies and units”. Looks like when one upgrades liquibase from 4.13 to 4.14 the error message changes from liquibase.exception.MigrationFailedException: to liquibase.exception.CommandExecutionException: liquibase.exception.LiquibaseException: