Below sample logs for the run with no script executed:
2024/01/03 07:32:21 main.go:105: Migration UP
2024/01/03 07:32:21 main.go:136: # WAITING FOR CONNECTION WITH DATABASE #
2024/01/03 07:32:21 main.go:149: # STARTING TO COPY MIGRATION FILES #
2024/01/03 07:32:21 main.go:178: # COULD NOT COPY OLD MIGRATION FILES: open migrations/kyma-environment-broker: no such file or directory
2024/01/03 07:32:21 main.go:184: # STARTING MIGRATION #
Error during driver initialization, dial tcp 127.0.0.1:5432: connect: connection refused
Error during driver initialization, dial tcp 127.0.0.1:5432: connect: connection refused
Error during driver initialization, dial tcp 127.0.0.1:5432: connect: connection refused
Error during driver initialization, dial tcp 127.0.0.1:5432: connect: connection refused
2024/01/03 07:32:21 main.go:224: No Changes. Migration done.
# HALT CLOUD SQL PROXY #
What we do not like about these logs?
Error messages prevail making impression that migration process failed, this is not true
There is no information about which script was the last one executed, making clear what is the current state of schema
If there are some scripts executed (not skipped) the information is very rudimentary, part of the file name is logged
AC
[x] there is a clear message, that script was executed and not failed, if there were some temporary error conditions (e.g. while trying to connect to database) it is clearly stated that we were retrying and eventually succeeded.
[x] even if we do not execute any script (all have been already executed) we get the message what was the last (chronologically) script executed
[x] if some scripts are executed (new ones) we get comprehensive information about which scripts were just executed (and which was the last one executed)
Below sample logs for the run with no script executed:
What we do not like about these logs?
AC