Skip to content

Conversation

filipelautert
Copy link
Collaborator

@filipelautert filipelautert commented Feb 7, 2025

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

Things to be aware of

Things to worry about

Additional Context

Copy link
Contributor

@StevenMassaro StevenMassaro left a comment

Choose a reason for hiding this comment

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

Can you add a test?

Are we planning on adding a message to the release notes of 4.30.0 explaining this issue and the recommended workaround?

ranChangeSet = ranIndex.get(incorrectKey);
if (ranChangeSet != null) {
if (!checkLiquibaseVersionIs(ranChangeSet.getLiquibaseVersion(), 4, 31)) {
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a logging line here.

Comment on lines +130 to +133
Scope.getCurrentScope().getSingleton(ExecutorService.class).getExecutor("jdbc", getDatabase()).execute(new UpdateChangeSetFilenameStatement
(changeSet, oldPath));
getDatabase().commit();
reset();
Copy link
Contributor

Choose a reason for hiding this comment

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

Add some logging here explaining what is happening please.

@@ -124,6 +125,14 @@ public void replaceChecksum(ChangeSet changeSet) throws DatabaseException {
reset();
}

@Override
public void replaceFilePath(ChangeSet changeSet, String oldPath) throws DatabaseException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any way to make this more targeted? And can we add a log about what's happening?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added another check in the calling class. Also, logs added!

@filipelautert filipelautert merged commit 08bedf1 into release Feb 10, 2025
35 checks passed
@filipelautert filipelautert deleted the DAT-19579 branch February 10, 2025 11:16
filipelautert added a commit that referenced this pull request Feb 10, 2025
* fix filename that was incorrect generated during 4.31.0

* chore: refactor and javadocs

* chore: more javadocs

* fix nullpointer; use correct method for logicalFilePath; logs

* chore comments

* fix another nullpointer

* chore: adding integration tests

* fix test title
suryaaki2 added a commit that referenced this pull request Feb 11, 2025
fix filename that was incorrect generated during 4.31.0 (#6712)

* fix filename that was incorrect generated during 4.31.0

* chore: refactor and javadocs

* chore: more javadocs

* fix nullpointer; use correct method for logicalFilePath; logs

* chore comments

* fix another nullpointer

* chore: adding integration tests

* fix test title

Co-authored-by: suryaaki2 <80348493+suryaaki2@users.noreply.github.com>
filipelautert added a commit that referenced this pull request Feb 13, 2025
* fix filename that was incorrect generated during 4.31.0

* chore: refactor and javadocs

* chore: more javadocs

* fix nullpointer; use correct method for logicalFilePath; logs

* chore comments

* fix another nullpointer

* chore: adding integration tests

* fix test title

(cherry picked from commit 08bedf1)
eichingertim pushed a commit to eichingertim/liquibase that referenced this pull request May 10, 2025
) (liquibase#6716)

fix filename that was incorrect generated during 4.31.0 (liquibase#6712)

* fix filename that was incorrect generated during 4.31.0

* chore: refactor and javadocs

* chore: more javadocs

* fix nullpointer; use correct method for logicalFilePath; logs

* chore comments

* fix another nullpointer

* chore: adding integration tests

* fix test title

Co-authored-by: suryaaki2 <80348493+suryaaki2@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants