Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Generate detailed report suitable for pasting into a bug report when a deploy fails #1627

Closed
mattbrictson opened this issue Mar 2, 2016 · 1 comment

Comments

@mattbrictson
Copy link
Member

When a Capistrano deploy fails, novice users especially have trouble interpreting the output. You get a Ruby backtrace mixed in with perhaps some stdout and stderr from the SSH command that failed.

For an experienced developer the cause of the error might be plain as day in this output, but nevertheless it represents a challenge to a lot of users, many of which might not even have a Ruby background (e.g. PHP devs).

I know this is potentially a lot of work, but it would be nice if Capistrano were to generate a nicely formatted error report that contained lots of useful troubleshooting information. Think of tools like better_errors in Rails, where you get an interactive backtrace, REPL, dump of the request hash, etc. I'm not saying we go that far, but there is definitely room for improvement with Capistrano's current output.

Some ideas:

  • An ssh command that the user can copy and paste into a shell to re-run the command that failed.
  • Nicely formatted info about: what command was run, in what working directory, with what env vars, as what user, etc.
  • The name of the Capistrano (Rake) task that failed.
  • Provide links to FAQ entries for common errors (e.g. git:check fails).

And maybe we could add a special troubleshooting task to dump information like:

  • A dump of env on the remote server.
  • The values of all known Capistrano variables (i.e. those given to set).

I'm sure there is other useful data that I'm forgetting at the moment.

A source of inspiration for me is Bundler, which generates a bug report template when an error occurs: https://github.com/bundler/bundler/blob/master/lib/bundler/friendly_errors.rb#L53-L89

@mattbrictson
Copy link
Member Author

Implemented in #1642.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant