You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The changes in #4463 cause Liquibase#calculateCheckSum() to always fail with the error message:
Error encountered while parsing the command line. '--changeset-identifier' cannot be provided alongside other changeset arguments: '--changeset-id', '--changeset-path', '--changeset-author'.
CalculateChecksumCommandStep.CHANGESET_PATH_ARG, CalculateChecksumCommandStep.CHANGESET_ID_ARG, CalculateChecksumCommandStep.CHANGESET_AUTHOR_ARG, andCalculateChecksumCommandStep.CHANGESET_IDENTIFIER_ARG which triggers the exception:
liquibase.exception.CommandExecutionException: liquibase.exception.LiquibaseException: java.lang.IllegalArgumentException: Error encountered while parsing the command line. '--changeset-identifier' cannot be provided alongside other changeset arguments: '--changeset-id', '--changeset-path', '--changeset-author'.
at liquibase.command.CommandScope.execute(CommandScope.java:237)
at liquibase.Liquibase.calculateCheckSum(Liquibase.java:1278)
at com.github.joschi.liquibase.DbCalculateChecksumCommandTest.liquibasePullRequest4463(DbCalculateChecksumCommandTest.java:47)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
Caused by: liquibase.exception.LiquibaseException: java.lang.IllegalArgumentException: Error encountered while parsing the command line. '--changeset-identifier' cannot be provided alongside other changeset arguments: '--changeset-id', '--changeset-path', '--changeset-author'.
at liquibase.command.core.CalculateChecksumCommandStep.validateIdentifierParameters(CalculateChecksumCommandStep.java:148)
at liquibase.command.core.CalculateChecksumCommandStep.run(CalculateChecksumCommandStep.java:95)
at liquibase.command.CommandScope.execute(CommandScope.java:214)
... 5 more
Caused by: java.lang.IllegalArgumentException: Error encountered while parsing the command line. '--changeset-identifier' cannot be provided alongside other changeset arguments: '--changeset-id', '--changeset-path', '--changeset-author'.
... 8 more
Expected/Desired Behavior
The checksum of the changeset should be calculated without an exception.
@joschi you are right, this change really broke the API and we will need to fix it. Meanwhile, would you mind switching to the new command framework that is used by this method? You could replace the method being called by:
Search first
Description
The changes in #4463 cause
Liquibase#calculateCheckSum()
to always fail with the error message:Looks like this check is responsible for the error message:
https://github.com/liquibase/liquibase/blame/v4.25.1/liquibase-standard/src/main/java/liquibase/command/core/CalculateChecksumCommandStep.java#L140-L142
The command is always constructed with
CalculateChecksumCommandStep.CHANGESET_PATH_ARG
,CalculateChecksumCommandStep.CHANGESET_ID_ARG
,CalculateChecksumCommandStep.CHANGESET_AUTHOR_ARG
, andCalculateChecksumCommandStep.CHANGESET_IDENTIFIER_ARG
which triggers the exception:https://github.com/liquibase/liquibase/blob/v4.25.1/liquibase-standard/src/main/java/liquibase/Liquibase.java#L1271-L1278
Steps To Reproduce
With Liquibase 4.25.0:
Exception:
Expected/Desired Behavior
The checksum of the changeset should be calculated without an exception.
Liquibase Version
4.25.0
Database Vendor & Version
All
Liquibase Integration
Code (via liquibase.Liquibase)
Liquibase Extensions
No response
OS and/or Infrastructure Type/Provider
No response
Additional Context
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: