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

Meaningless error message when changelog file is missing a file ending #3055

Open
shmyer opened this issue Jul 12, 2022 · 0 comments
Open

Meaningless error message when changelog file is missing a file ending #3055

shmyer opened this issue Jul 12, 2022 · 0 comments

Comments

@shmyer
Copy link

shmyer commented Jul 12, 2022

Environment

Liquibase Version: 4.3.1 #26 built at 2021-02-12 17:41+0000

Liquibase Integration & Version: CLI

Liquibase Extension(s) & Version:

Database Vendor & Version: Greenplum Database (Postgresql jdbc driver)

Operating System Type & Version: Linux Docker image (version unclear)

Infrastructure Type/Provider: VM with SLES 12 and Docker Engine

Description

When including a file for my SQL changelogs that is missing the file ending .sql on accident, liquibase validate exits with a meaningless error message and the cause to the issue can be hard to identify. In some environments (e.g. with pipelines) one can't easily change the --logLevel flag to look for further clues (if there are any. I didn't test that).

Steps To Reproduce

List the steps to reproduce the behavior.

  • Use the following master.xml pointing to a folder with SQL changelog files
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
	xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd">
	<includeAll path="changelogs/" relativeToChangelogFile="true"/>
</databaseChangeLog>
  • Have multiple SQL changelog files in the folder (I didn't test it with just one file), one of them without a file ending .sql
  • Run liquibase validate

Actual Behavior

A clear and concise description of what happens in the software with the version used.

  • liquibase validate fails with the following console output
Starting Liquibase at 07:50:27 (version 4.3.1 #26 built at 2021-02-12 17:41+0000)
Unexpected error running Liquibase: Unknown reason
For more information, please use the --logLevel flag
script returned exit code 255

Expected/Desired Behavior

A meaningful error message should be returned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants