Skip to content

Improve logging and error handling #888

@matejchalk

Description

@matejchalk

The problem

Users have a hard time setting up our CLI and plugins on their own.

Error handling

  • Users have a hard time understanding errors from the CLI.
  • Errors don't give hints on how to fix them.
  • It often isn't clear in which step an error occurred.
  • Debugging errors using --verbose flag is of very little help, as this log level is barely used.
  • Some errors are unnecessarily verbose (e.g. Zod schema validation).
  • Output and error streams from executed processes are often silenced unless there's an error, hiding potentially valuable information.

Logging

  • The only progress indicator is a progress bar which is supposed to update discretely whenever a plugin is finished running (but has actually been broken for a long time, so it just skips to 100% immediately).
  • For long-running plugin execution, there's no way for a user to tell if something is still happening or if it's hanging.
  • Aside from the final report, very little information is logged about what the CLI is doing. This lack of transparency contributes to users struggling to understand where an error came from, as well as how the CLI is supposed to work in general.
  • The progress bar also causes strange UI side-effects (scrolling logs out of viewport), is difficult to test and isn't suitable for logging in CI pipelines.

Proposed solution

Inspiration

stdout.webm

Sub-issues

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions