liquibase: change at 4.19.1 makes includeAll is finding duplicates
Search first
- I searched and no similar issues were found
Description
Granted our change log is pretty janky due to some not great decisions when we started out with this repo, but it was working with 4.19.0. The update with 4.19.1 is now raising an exception that we have duplicate changelogs defined. Previously the final changelog lookup would skip over the existing changelogs that were defined.
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd
http://www.liquibase.org/xml/ns/pro
http://www.liquibase.org/xml/ns/pro/liquibase-pro-4.1.xsd">
<includeAll path="changelog/0.0/"/>
<includeAll path="changelog/0.1/"/>
<includeAll path="changelog/0.2/"/>
<includeAll path="changelog/0.3/"/>
<includeAll path="changelog/0.4/"/>
<includeAll path="changelog/0.5/"/>
<includeAll path="changelog/0.6/"/>
<includeAll path="changelog/0.7/"/>
<includeAll path="changelog/0.8/"/>
<includeAll path="changelog/0.9/"/>
<includeAll path="changelog/1.0/"/>
<includeAll path="changelog/1.1/"/>
<includeAll path="changelog/1.2/"/>
<includeAll path="changelog/1.3/"/>
<includeAll path="changelog/1.4/"/>
<includeAll path="changelog/1.5/"/>
<includeAll path="changelog/1.6/"/>
<includeAll path="changelog/1.7/"/>
<includeAll path="changelog/1.8/"/>
<includeAll path="changelog/1.9/"/>
<includeAll path="changelog/"/>
</databaseChangeLog>
Steps To Reproduce
- Create a change log with a specific folder defined
- Create a change log that also includes that folder and at least one other folder
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd
http://www.liquibase.org/xml/ns/pro
http://www.liquibase.org/xml/ns/pro/liquibase-pro-4.1.xsd">
<includeAll path="changelog/1.0/"/>
<includeAll path="changelog/"/>
</databaseChangeLog>
Actual Behavior
####################################################
## _ _ _ _ ##
## | | (_) (_) | ##
## | | _ __ _ _ _ _| |__ __ _ ___ ___ ##
## | | | |/ _` | | | | | '_ \ / _` / __|/ _ \ ##
## | |___| | (_| | |_| | | |_) | (_| \__ \ __/ ##
## \_____/_|\__, |\__,_|_|_.__/ \__,_|___/\___| ##
## | | ##
## |_| ##
## ##
## Get documentation at docs.liquibase.com ##
## Get certified courses at learn.liquibase.com ##
## Free schema change activity reports at ##
## https://hub.liquibase.com/ ##
## ##
####################################################
Starting Liquibase at 20:12:35 (version 4.19.1 #7641 built at 2023-02-28 18:08+0000)
Liquibase Version: 4.19.1
Liquibase Open Source 4.19.1 by Liquibase
Validation Error:
85 changesets had duplicate identifiers
changelog/1.8/changelog-00.sql::1.8.0::joe.shmo
changelog/0.8/changelog-1.sql::raw::includeAll
Expected/Desired Behavior
Go back to how it was or document a fix moving forward?
Liquibase Version
4.19.1
Database Vendor & Version
postgresql
Liquibase Integration
Github Action
Liquibase Extensions
None
OS and/or Infrastructure Type/Provider
Ubuntu
Additional Context
No response
Are you willing to submit a PR?
- I’m willing to submit a PR (Thank you!)
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 2
- Comments: 27 (12 by maintainers)
@bodewig not yet, it still in our dev queue. Hopefully it will be released in the next version.
@filipelautert I am actually executing spring boot tests with gradle. So command line looks like:
gradle -Dliquibase.allowDuplicatedChangesetIdentifiers=true :project:test
.I have tried to create reproduce project but it works even without new property, so I am little confused why it don’t works at main project
UPD: I updated reproduce project with README and added test
Hi @filipelautert,
Yes, this looks better. The example works now as expected, thank you very much.
Hi @filipelautert,
Unfortunately, I just realized that the issue is a little bit deeper than we originally thought and that the fix does not solve it. If we modify my above example and let the changeset create a table named “A” we get an error during the execution, as the table exists already. This means the regression does not only affect the duplication check but also the actual execution.
So I think the regression is a little bit more serious than I originally thought.
Best regards,
Nils
Hi,
Any news or plans on this topic? With the current Spring Boot version (3.2.0) a downgrade of Liquibase to 4.19.0 is no longer possible, due to a ClassNotFoundException (e.g., liquibase.UpdateSummaryEnum). So this issue became a blocker for us.
Best regards
Nils
@bmoregeo thanks for the feedback! If you are willing to skip 4.19.1 , we are discussing about using “strict” flag on 4.20.0 to bypass it, as we were not expecting this issue with includes (ie none of our tests were addressing this case yet). The change may be: if strict is set then don’t allow duplicates; otherwise use the old behavior.