Open
Description
Search first
- I searched and no similar issues were found
Description
The message "Database is up to date, no changesets to execute" appears on the console when the update command has no work to do. Sample output (this is using our custom JSON logger):
{"timestamp":"2024-05-08T08:43:59.944-0700","thread":"main","logger":"liquibase.database.core.PostgresDatabase","message":"Set default schema name to public","severity":"INFO"}
{"timestamp":"2024-05-08T08:44:00.251-0700","thread":"main","logger":"liquibase.changelog.StandardChangeLogHistoryService","message":"Reading from public.databasechangelog","severity":"INFO"}
Database is up to date, no changesets to execute
{"timestamp":"2024-05-08T08:44:00.791-0700","thread":"main","logger":"liquibase.changelog.StandardChangeLogHistoryService","message":"Reading from public.databasechangelog","severity":"INFO"}
{"timestamp":"2024-05-08T08:44:00.840-0700","thread":"main","logger":"liquibase.util.ShowSummaryUtil","message":"UPDATE SUMMARY","severity":"INFO"}
{"timestamp":"2024-05-08T08:44:00.840-0700","thread":"main","logger":"liquibase.util.ShowSummaryUtil","message":"Run: 0","severity":"INFO"}
{"timestamp":"2024-05-08T08:44:00.840-0700","thread":"main","logger":"liquibase.util.ShowSummaryUtil","message":"Previously run: 19","severity":"INFO"}
{"timestamp":"2024-05-08T08:44:00.840-0700","thread":"main","logger":"liquibase.util.ShowSummaryUtil","message":"Filtered out: 0","severity":"INFO"}
{"timestamp":"2024-05-08T08:44:00.840-0700","thread":"main","logger":"liquibase.util.ShowSummaryUtil","message":"-------------------------------","severity":"INFO"}
{"timestamp":"2024-05-08T08:44:00.840-0700","thread":"main","logger":"liquibase.util.ShowSummaryUtil","message":"Total change sets: 19","severity":"INFO"}
{"timestamp":"2024-05-08T08:44:00.841-0700","thread":"main","logger":"liquibase.util.ShowSummaryUtil","message":"Update summary generated","severity":"INFO"}
{"timestamp":"2024-05-08T08:44:01.189-0700","thread":"main","logger":"liquibase.lockservice.StandardLockService","message":"Successfully released change log lock","severity":"INFO"}
{"timestamp":"2024-05-08T08:44:01.237-0700","thread":"main","logger":"liquibase.command.CommandScope","message":"Command execution complete","severity":"INFO"}
Steps To Reproduce
The code we are running looks like this:
Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(new JdbcConnection(connection));
CommandScope updateCommand = new CommandScope(UpdateCommandStep.COMMAND_NAME);
updateCommand.addArgumentValue(UpdateCommandStep.CHANGELOG_FILE_ARG, "db/migration/changelog.yaml");
updateCommand.addArgumentValue(DbUrlConnectionCommandStep.DATABASE_ARG, database);
updateCommand.addArgumentValue(ShowSummaryArgument.SHOW_SUMMARY_OUTPUT, UpdateSummaryOutputEnum.LOG);
var results = updateCommand.execute();
Expected/Desired Behavior
If show-summary-output is set to log, all output from the command should be through the logging system.
Liquibase Version
4.27.0
Database Vendor & Version
PostgreSQL 12
Liquibase Integration
No response
Liquibase Extensions
No response
OS and/or Infrastructure Type/Provider
macOS and Linux
Additional Context
This message is DATABASE_UP_TO_DATE_MESSAGE
in AbstractUpdateCommandStep
. It appears in two places. I'm suspicious of this one in isUpToDate
Scope.getCurrentScope().getUI().sendMessage(DATABASE_UP_TO_DATE_MESSAGE);
just because getUI
sounds like something that might bypass the log system.
Are you willing to submit a PR?
- I'm willing to submit a PR (Thank you!)