vitessio / vitess-releaser

Tooling to release vitess
https://vitess.io
Apache License 2.0
4 stars 0 forks source link

Improve error logging #111

Closed rohit-nayak-ps closed 2 months ago

rohit-nayak-ps commented 2 months ago

We used to panic on various errors in the releaser. Some stack traces are very large and maybe contain control characters, not allowing us to scroll back to the top of the error stack and needing an stty sane to restore the terminal.

This PR replaces panics by printing the error and the debug stack and exiting. It also handles inadvertent panics via a recover and logging.

frouioui commented 2 months ago

Before merging this let's wait for @shlomi-noach to confirm that this fixes the issue he was experiencing with his terminal.

rohit-nayak-ps commented 2 months ago

He already said it is not helping his issue: looks like there is something different in his shell/terminal environment. However I think switching from panic to outputing the error directly is a better solution since we then don't just get the "Abort" message and have to rerun it after redirecting outputs.