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
Fix handling of relativeToChangelogFile with classpath: prefixed changelogs #2189
Conversation
➤ Erzsebet Carmean commented: Liquibase 4.6.1-fix-classpath-prefix-include-SNAPSHOT #2Testing done with MySQL 8 on a Windows 10 OS.
Verify the SpringBoot application does not fail due to an error loading the Liquibase classpath. PASS
Verify the SpringBoot application successfully created objects on the database. PASS
Output of Fixed BuildC:\Users\erz\work\liquibase-cascade-demo\target>java -jar demo-0.0.1-SNAPSHOT.jar . ____ _ __ _ _ 2021-11-18 12:14:28.258 INFO 20420 --- [ main] c.e.demo.LiquibaseDemoApplicationKt : Starting LiquibaseDemoApplicationKt v0.0.1-SNAPSHOT using Java 14.0.2 on LENOVO with PID 20420 (C:\Users\erz\work\liquibase-cascade-demo\target\demo-0.0.1-SNAPSHOT.jar started by erz in C:\Users\erz\work\liquibase-cascade-demo\target) |
Description
This is Windows specific issue.
In 4.6.0, a change broke the ability for spring boot projects that reference their changelog files with a
classpath:
prefix toinclude
files withrelativeToChangelog=true
Replication Info
pom.xml file (liquibase dependency):
application.yml file:
db-changelog.xml file:
These files come from https://github.com/nsobadzhiev/liquibase-cascade-demo which also replicates the issue.
Error Message
Work Around
Removing
classpath:
from your changelog file configuration will avoid the bug.Dev Handoff Notes (Internal Use)
Links
Testing
Dev Verification
I found the bug when testing a different problem using the referenced repo. Running
mvn test
reproduced the problem. After the fix,mvn test
worked.I didn't include a unit test for the change because it's in a part of the code that would need a good amount of setup to be able to test. We need to get tests written around the spring integration better, and those tests will catch this at that point.
Test Requirements (Liquibase Internal QA)
SpringBoot includes a built-in version of Liquibase which is quite old. Newer builds of Liquibase break handling of the Liquibase classpath. To reproduce this bug, specify an exact Liquibase version in the pom.xml. (See pom.xml example in repro steps for how to specify Liquibase 4.6.0).
Testing requires one MySQL database instance.
Manual Tests
Setup: