pgloader
pgloader copied to clipboard
MySQL "Access denied" should exit with a non-zero status
$ docker run --rm -it --network host dimitri/pgloader:latest pgloader mysql://<REDACTED> postgresql://[email protected]/newdb
2021-10-21T00:28:20.016000Z LOG pgloader version "3.6.3~devel"
2021-10-21T00:28:20.051000Z LOG Migrating from #<MYSQL-CONNECTION mysql://<REDACTED> {1005E963E3}>
2021-10-21T00:28:20.051000Z LOG Migrating into #<PGSQL-CONNECTION pgsql://[email protected]:5432/newdb {1005FD7FA3}>
2021-10-21T00:28:20.578000Z ERROR mysql: Failed to connect to mysql at "<REDACTED>" (port 3306) as user "<REDACTED>": MySQL Error [1045]: "Access denied for user <REDACTED> (using password: YES)"
2021-10-21T00:28:20.578000Z LOG report summary reset
table name errors rows bytes total time
----------------- --------- --------- --------- --------------
fetch meta data 0 0 0.000s
----------------- --------- --------- --------- --------------
----------------- --------- --------- --------- --------------
$ echo $?
0
Expected: return a non-zero status code.
This is important for CI systems that fail based on command exit statuses. Right now, my CI system "passes" but doesn't do the expected work.
Thanks!