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
When I run dbt debug, I would expect a successful exit code (0) when the connection test succeeds and an error code (>0) when the connection test fails. In 0.18.1 the exit code is always 0, regardless of the result of the test.
Steps To Reproduce
Make sure your profile works
Run dbt debug (connection test should succeed)
Run echo $? - observe that the output is 0
Mess up your profile (e.g. change the port to an invalid one)
Run dbt debug (connection test should fail)
Run echo $? - observe that the output is still 0
Expected behavior
A strictly positive exit code when the connection test fails.
@sdebruyn I agree. If dbt debug manages to detect an error in your path, project, connection profile—or that you're not running from a dbt project at all—it feels like it should return 1 ("handled error") as the exit code instead of 0. I imagine could be useful for plugin maintainers who want to check various connection methods in CI (e.g. dbt-msft/dbt-sqlserver#65).
Is this a change you'd be interested in contributing?
Describe the bug
When I run
dbt debug
, I would expect a successful exit code (0) when the connection test succeeds and an error code (>0) when the connection test fails. In0.18.1
the exit code is always 0, regardless of the result of the test.Steps To Reproduce
dbt debug
(connection test should succeed)echo $?
- observe that the output is0
dbt debug
(connection test should fail)echo $?
- observe that the output is still0
Expected behavior
A strictly positive exit code when the connection test fails.
Screenshots and log output
Mentioned in repro
System information
Any database
The output of
dbt --version
:**The operating system you're using: Debian Buster
The output of
python --version
:Python 3.8.7
The text was updated successfully, but these errors were encountered: