Extracting GitHub error on push

We’re having some minor problems with our installation at CockroachDB (https://bors.crdb.io). Specifically, we’re seeing quite a few errors on push that look like this:

{{:badmatch, {:error, :push}},
 [{BorsNG.GitHub, :push!, 3,
   [file: 'lib/github/github.ex', line: 63]},
  {BorsNG.Worker.Batcher, :complete_batch, 3,
   [file: 'lib/worker/batcher.ex', line: 385]},
  {BorsNG.Worker.Batcher, :maybe_complete_batch, 1,
   [file: 'lib/worker/batcher.ex', line: 372]},
  {BorsNG.Worker.Batcher, :handle_cast, 2,
   [file: 'lib/worker/batcher.ex', line: 74]},
  {:gen_server, :try_dispatch, 4,
   [file: 'gen_server.erl', line: 601]},
  {:gen_server, :handle_msg, 5,
   [file: 'gen_server.erl', line: 667]},
  {:proc_lib, :init_p_do_apply, 3,
   [file: 'proc_lib.erl', line: 247]}]}

I know this is usually because of a misconfigured branch protection rule, but in this case these failures seem to be spurious and transient. Often retrying the pull request via another bors r+ is sufficient to make the error disappear. Something more subtle must be going wrong.

So: is there any way to get Bors to dump the text of the GitHub error message somewhere? I’ve tried scanning the log messages to no avail. The most descriptive message I’ve found is {{badmatch,{error,push}}, which is really not very helpful at all.

I’m pushing a commit to include more error information on failed pushes like that:

Oh man, I wish I’d checked my email first! I just hacked this up: https://github.com/bors-ng/bors-ng/compare/master...benesch:debug-crashes?expand=1.

It’ll be super great to have a proper solution for this, though. Thanks, @notriddle!

1 Like