Skip to content

Conversation

@ggwadera
Copy link
Contributor

@ggwadera ggwadera commented Oct 9, 2023

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Fixes #4891.
Update the isUpToDateFastCheck method to include the changelog file path in the cache key, preventing the bug reported in the issue, as suggested by @nwwerum.

I also created a simple Spring app with steps to reproduce this bug, you may find it here https://github.com/ggwadera/liquibase-bug-4891.

Things to be aware of

None as far as I know.

Things to worry about

This bug was not captured in any of the automated tests. I tried to include a unit test for this but unfortunately I couldn't get it working. Would gladly accept any suggestions for this.

Additional Context

From my testing, this bug only happens with an already initialized database. When more than one SpringLiquibase beans are present, the first ones that have already been applied causes the isUpToDateFastCheck cache key to be marked as up-to-date. This prevents the following changelogs to be executed, as the cache key is the same for all of them.

@filipelautert filipelautert self-assigned this Oct 9, 2023
Copy link
Collaborator

@filipelautert filipelautert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a looong key! Thanks @ggwadera

@filipelautert filipelautert merged commit b6ae145 into liquibase:master Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

No changesets run when having multiple changelogs against the same DB

4 participants