Skip to content
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

Added new liquibase.duplicateFileMode setting #3006

Merged
merged 6 commits into from Jun 30, 2022

Conversation

nvoxland
Copy link
Contributor

@nvoxland nvoxland commented Jun 25, 2022

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

Currently, when the same path is found in multiple locations liquibase fails with an error.

This PR adds a new liquibase.duplicateFileMode global setting which defaults to "ERROR" but can also be set to "WARN".

Things to be aware of

  • Existing behavior of "ERROR" logic is still the default.
  • Refactored some usages of openStreams that duplicated the logic in openStream to just use openStream in order to take advantage of this new behavior.
  • Searched the code for usages of openStream vs. openStreams and addressed all I found that should be updated

Things to worry about

  • Nothing

@github-actions
Copy link

github-actions bot commented Jun 25, 2022

Unit Test Results

  4 548 files  +   379    4 548 suites  +379   32m 14s ⏱️ + 5m 4s
  4 523 tests +       1    4 309 ✔️ +     77     214 💤  -   30  0 ±0 
53 556 runs  +4 474  48 548 ✔️ +4 080  5 008 💤 +440  0 ±0 

Results for commit 9e1ce2a. ± Comparison against base commit e8c6019.

♻️ This comment has been updated with latest results.

@kataggart kataggart added this to To Do in Conditioning++ via automation Jun 27, 2022
@kataggart kataggart linked an issue Jun 27, 2022 that may be closed by this pull request
@kataggart
Copy link
Contributor

kataggart commented Jun 27, 2022

note: if duplicate is found, first one is processed (need to define in docs what "first" is); please keep default as ERROR

@nvoxland nvoxland removed their assignment Jun 28, 2022
@FBurguer
Copy link

Now when you duplicateFileMode=WARN you get msg explainng that liquibase found 2 changelogs with the same name but continues working with the "first" changelog it founds.
Both values work as expected and the default value is ERROR like in the description of the PR.

Test Environment:
OS: Windows 10
MySQL Docker Container v8.0.27
Java 8

@nvoxland nvoxland merged commit 4109106 into master Jun 30, 2022
Conditioning++ automation moved this from To Do to Done Jun 30, 2022
@nvoxland nvoxland deleted the added-duplicate-file-mode branch June 30, 2022 15:35
@nvoxland nvoxland added this to the v4.13.0 milestone Jun 30, 2022
@nvoxland nvoxland linked an issue Jul 6, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

changelog is found twice in classpath
4 participants