jsdelivr / bot

DEPRECATED The jerk of a bot that checks PRs and responds in comments
22 stars 14 forks source link

Bot failes very often #52

Open jimaek opened 8 years ago

jimaek commented 8 years ago

Lately a lot of PRs are not checked at all by the bot. I think it happens when multiple PRs arrive at the same time but it could be something else completely.

Either @megawac or @MartinKolarik please check because its very important. We heavily rely on this bot to merge

megawac commented 8 years ago

@jimaek, have you taken a look at the bot app logs?

On Tue, Feb 9, 2016 at 5:14 PM, Dmitriy Akulov notifications@github.com wrote:

Lately a lot of PRs are not checked at all by the bot. I think it happens when multiple PRs arrive at the same time but it could be something else completely.

Either @megawac https://github.com/megawac or @MartinKolarik https://github.com/MartinKolarik please check because its very important. We heavily rely on this bot to merge

— Reply to this email directly or view it on GitHub https://github.com/jsdelivr/bot/issues/52.

jimaek commented 8 years ago

There are lots of errors, not sure which ones are related.

 2 files changed, 4 insertions(+), 4 deletions(-)
Switched to branch 'pr/9578'
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)
Deleted branch pr/9578 (was 38e1f48).
To git@github.com:jsdelivr/jsdelivr
   e816ffc..38e1f48  master -> master
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 783, in __bootstrap
    self.__bootstrap_inner()
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
--- <exception caught here> ---
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 191, in _worker
    result = context.call(ctx, function, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
  File "/usr/local/lib/python2.7/dist-packages/blinker/base.py", line 267, in send
    for receiver in self.receivers_for(sender)]
  File "./run.py", line 13, in on_pull
    jimaek.validate(int(data.get("number", None)))
  File "/home/bot/validator.py", line 35, in validate
    last_commit = deque(pr.iter_commits(), maxlen=1).pop()
exceptions.IndexError: pop from an empty deque
HEAD is now at 38e1f48 Fix the merge issues in #9566 Update the project info
No rebase in progress?
You are right git; we are not in a rebase!
From github.com:jsdelivr/jsdelivr
   38e1f48..0324c39  master     -> origin/master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)
Deleted branch pr/9129 (was ecb3bff).
To git@github.com:jsdelivr/jsdelivr
   317693c..ecb3bff  master -> master
Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1402, in dataReceived
    finishCallback(data[contentLength:])
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1631, in _finishRequestBody
    self.allContentReceived()
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1694, in allContentReceived
    req.requestReceived(command, path, version)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 790, in requestReceived
    self.process()
--- <exception caught here> ---
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 189, in process
    self.render(resrc)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 238, in render
    body = resrc.render(self)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/resource.py", line 250, in render
    return m(request)
  File "/home/bot/server.py", line 28, in render_POST
    sig = request.getHeader("X-Hub-Signature")[5:]
exceptions.TypeError: 'NoneType' object has no attribute '__getitem__'
Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 571, in dataReceived
    why = self.lineReceived(line)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1619, in lineReceived
    self.allContentReceived()
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1694, in allContentReceived
    req.requestReceived(command, path, version)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 790, in requestReceived
    self.process()
--- <exception caught here> ---
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 189, in process
    self.render(resrc)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 238, in render
    body = resrc.render(self)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/resource.py", line 250, in render
    return m(request)
  File "/home/bot/server.py", line 28, in render_POST
    sig = request.getHeader("X-Hub-Signature")[5:]
exceptions.TypeError: 'NoneType' object has no attribute '__getitem__'
megawac commented 8 years ago

At a glance looks like authentication issues. Might be a gh api bug On Feb 10, 2016 3:29 AM, "Dmitriy Akulov" notifications@github.com wrote:

There are lots of errors, not sure which ones are related.

2 files changed, 4 insertions(+), 4 deletions(-) Switched to branch 'pr/9578' Switched to branch 'master' Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) Deleted branch pr/9578 (was 38e1f48). To git@github.com:jsdelivr/jsdelivr e816ffc..38e1f48 master -> master Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 783, in bootstrap self.bootstrap_inner() File "/usr/lib/python2.7/threading.py", line 810, in bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.__target(_self.args, _self.__kwargs) --- --- File "/usr/local/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 191, in _worker result = context.call(ctx, function, _args, _kwargs) File "/usr/local/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, _args, _kw) File "/usr/local/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext return func(args,kw) File "/usr/local/lib/python2.7/dist-packages/blinker/base.py", line 267, in send for receiver in self.receivers_for(sender)] File "./run.py", line 13, in on_pull jimaek.validate(int(data.get("number", None))) File "/home/bot/validator.py", line 35, in validate last_commit = deque(pr.iter_commits(), maxlen=1).pop() exceptions.IndexError: pop from an empty deque HEAD is now at 38e1f48 Fix the merge issues in #9566 Update the project info No rebase in progress? You are right git; we are not in a rebase! From github.com:jsdelivr/jsdelivr 38e1f48..0324c39 master -> origin/master

Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) Deleted branch pr/9129 (was ecb3bff). To git@github.com:jsdelivr/jsdelivr 317693c..ecb3bff master -> master Unhandled Error Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1402, in dataReceived finishCallback(data[contentLength:]) File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1631, in _finishRequestBody self.allContentReceived() File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1694, in allContentReceived req.requestReceived(command, path, version) File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 790, in requestReceived self.process() --- --- File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 189, in process self.render(resrc) File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 238, in render body = resrc.render(self) File "/usr/local/lib/python2.7/dist-packages/twisted/web/resource.py", line 250, in render return m(request) File "/home/bot/server.py", line 28, in render_POST sig = request.getHeader("X-Hub-Signature")[5:] exceptions.TypeError: 'NoneType' object has no attribute 'getitem' Unhandled Error Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 571, in dataReceived why = self.lineReceived(line) File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1619, in lineReceived self.allContentReceived() File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1694, in allContentReceived req.requestReceived(command, path, version) File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 790, in requestReceived self.process() --- --- File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 189, in process self.render(resrc) File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 238, in render body = resrc.render(self) File "/usr/local/lib/python2.7/dist-packages/twisted/web/resource.py", line 250, in render return m(request) File "/home/bot/server.py", line 28, in render_POST sig = request.getHeader("X-Hub-Signature")[5:] exceptions.TypeError: 'NoneType' object has no attribute 'getitem'

— Reply to this email directly or view it on GitHub https://github.com/jsdelivr/bot/issues/52#issuecomment-182251457.

megawac commented 8 years ago

First error looks like an issue retrieving data from the gh api (GH API gave an empty object back for the commits), I don't know if we should bother handling this

Second one looks like a GH API bug in which it failed to attach the hub signature payload (this could be addressed by a better error message)

If you see either of these in the future I would just retrigger the bot

jimaek commented 8 years ago

Thats what I do now but it keeps happening. If its an API issue I guess we can wait a bit for it to stabilize.

jimaek commented 8 years ago

Hey any update on this? It happens every day multiple times.

megawac commented 8 years ago

I'll look into it over weekend On Feb 23, 2016 6:38 AM, "Dmitriy Akulov" notifications@github.com wrote:

Hey any update on this? It happens every day multiple times.

— Reply to this email directly or view it on GitHub https://github.com/jsdelivr/bot/issues/52#issuecomment-187665473.