jj: FR: Automatic bug reporting with `jj rage`.

Is your feature request related to a problem? Please describe. Add a jj rage command which copies an anonymized state of the current repo, zips it and allows the user to write a bug report which then creates a new issue in the corresponding issuetracker.

Additional context I like the term rage for bug reporting. I’m pretty sure there exists some crate for it already on crates.io. I found this while digging through some older Discord conversations.

About this issue

  • Original URL
  • State: open
  • Created 4 months ago
  • Reactions: 1
  • Comments: 15 (3 by maintainers)

Most upvoted comments

I’m opposed to the name “rage” as it’s not self-descriptive at all.


git-branchless bug-report includes this:

  • System configuration
  • Contents of installed Git hooks (relevant for git-branchless)
  • Last N events (default 5)
    • Also shows smartlog rendering after each event.
    • All branch/reference names are redacted to consistent identifiers, except for the main branch, which retains its name.
    • Commit hashes are not redacted, which doesn’t seem to have been a problem so far, but you could conceivably do consistent-renaming for those as well.

See https://github.com/arxanas/git-branchless/blob/3faa0744cf0b0c7c2fe2bf20e5f441776f21c6dd/git-branchless/tests/test_bug_report.rs for an example.

On several occasions, people have manually redacted information from their smartlogs to discuss something, and I wish I could have told them ahead of time that there’s a built-in function for that 🤣.

We can borrow https://github.com/erkin/ponysay.

I shared this with a brony friend of mine, and he said that that picture is from a scene where that character is saying “I just don’t know what went wrong”, and I’m very displeased with how on point that makes it.

We can borrow https://github.com/erkin/ponysay.

image

Update: I also found https://github.com/maandree/util-say for custom pictures.

jj sad, at least as an alias to something serious like jj bug-report sounds hilarious :)

I agree with calling about it jj bugreport, but I still think the more important question to answer is this:

It’s also a tricky balance between making the bug report useful and anonymous enough. I’ll let someone else propose what we would include.

I honestly quite like jj rage as a name; I thought it was quite cute in both sapling and buck2. I think being a little cheeky is just fine for reporting bugs. 😃 I would normally just consider rage to be part of other “helpful commands” like docs or help, not something under debug. Unfortunately, because Clap can’t categorize commands in the help output, you end up needing to use subcommands for everything to get the grouping another way…

I’m also not sure if we’d want to have the bugs automatically filed, or how that would even work since the user would need a Github account to create an issue. Maybe zipping up some debugging info is sufficient?

I’m not even sure we want to try zipping up the repository, but generally speaking these tools would talk to a proxy server that would relay the bug to GitHub via OAuth if we wanted anonymized reports; alternatively we could support filing bugs with GitHub’s API itself assuming that the user has a proper access token on their machine, normally if they use the gh tool to login then it’s available in something like $HOME/.config/gh/; other tools piggyback on gh in this way too, like Sapling. So that would allow users to submit bugs under their own account.

For context, Google currently has hg bugreport and Meta has hg rage AFAIK (I assume that’s where Philip got the name from). jj debug report seems reasonable (hg doesn’t have support for nested subcommands).