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

command "unexpectedChangesets" always reports at least 1 unexpected changeset with initial tag in database #5442

Closed
1 of 2 tasks
afigur opened this issue Jan 5, 2024 · 1 comment · Fixed by #5446
Closed
1 of 2 tasks

Comments

@afigur
Copy link

afigur commented Jan 5, 2024

Search first

  • I searched and no similar issues were found

Description

Performing "tag" on an empty database creates a "liquibase-internal" changeset.
"unexpectedChangesets" fails to disregard this changeset and always reports at least 1 unexpected changeset.

Steps To Reproduce

Step 1: start with empty database
Step 2: tag "mytag"
Step 3: execute 1 changeset
Step 4: run "unexpectedChangesets" with no changes made after step 3
Step 5: get 1 unexpected changeset reported back

Expected/Desired Behavior

get no unexpected changeset reported back

Liquibase Version

4.25.1

Database Vendor & Version

Oracle

Liquibase Integration

-core lib in java project

Liquibase Extensions

  • none -

OS and/or Infrastructure Type/Provider

Win 11

Additional Context

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR (Thank you!)
@tati-qalified
Copy link
Contributor

Hi @afigur, as there's a PR in the works that's supposed to fix this issue (#5446 ), I'd suggest you to subscribe to it so you can get updates on its progress.

filipelautert added a commit that referenced this issue Feb 29, 2024
…s at least 1 unexpected changeset with initial tag in database (#5446)

* Changed the visit function in ExpectedChangesVisitor to call a new function, isSameAsIgnoreLiquibaseInternalChangeset to ignore the liquibase-internal filepath.

* Renamed isSameAsIgnoreLiquibaseInternalChangeset to isSameAsOrIsLiquibaseInternalChangeset

* Renamed isSameAsIgnoreLiquibaseInternalChangeset to isSameAsOrIsLiquibaseInternalChangeset

* - Removed commented line from isSamePath method.
- Add runUnexpectedChangeSet method to CommandUtil class.
- Add unexpected changeset test to validate running a tag to the database is not reported as a unexpected changeset.

* Moved the logic up a level. This is specific to the unexpected sets, so I expanded the removeIf predicate to be two conditions. This solves the issue of changesets not showing up in the DBCL table.

* revert changes

---------

Co-authored-by: Daniel Mallorga <dmallorga@liquibase.com>
Co-authored-by: filipe <flautert@liquibase.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
3 participants