Page MenuHomePhabricator

gerrit-reviewer-bot stopped working
Closed, ResolvedPublic

Description

It has been reported by @Paladox that gerrit-reviewer-bot, the bot that adds Gerrit reviewers listed on the special wiki page,:

https://github.com/valhallasw/gerrit-reviewer-bot/
"This bot reads reviewers from http://www.mediawiki.org/wiki/Git/Reviewers and adds them to changes in Gerrit."

has stopped working since the recent Gerrit version upgrade to 2.12.2 (T70271) (citation needed, maybe it was broken before)

we see the code and instructions but are not sure yet where the bot is running.

adding @valhallasw

Event Timeline

thanks Legoktm, i was able to get into that tool and found this log:

Tue Jul 26 20:05:12 UTC 2016: Running as task 9149433 @ tools-exec-1408.eqiad.wmflabs
/data/project/gerrit-reviewer-bot/venv/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/data/project/gerrit-reviewer-bot/venv/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Traceback (most recent call last):
  File "pop3bot.py", line 120, in <module>
    reviewers = get_reviewers_for_changeset(changeset)
  File "pop3bot.py", line 82, in get_reviewers_for_changeset
    owner = changeset['owner']['name']
KeyError: 'name'

see "urllib3 on python 2.7 SNI error"

Dzahn renamed this task from gerrit-reviewer-bot stopped working due to API changes? to gerrit-reviewer-bot stopped working.Jul 26 2016, 8:21 PM
Dzahn updated the task description. (Show Details)

Oh, I know what changed. I had to fix one of my other Gerrit API tools for this too.

Hi could you apply that so we could test it please @Legoktm

git clone https://github.com/legoktm/gerrit-reviewer-bot.git

git checkout patch-1

I can't, I don't have access to that tool.

The key error thing is the same as T141293. The SSL stuff looks like warnings, but should probably be fixed too.

The SSL stuff looks like warnings, but should probably be fixed too.

The ssl bits in the log can be ignored. That's urllib3 hating the version of openssl we have in Tool Labs.

I hot patched the script on the tool and will leave a note on the pull request.

Mentioned in SAL [2016-07-26T21:45:49Z] <bd808> Added Legoktm as maintainer to help with T141390

Paladox triaged this task as Unbreak Now! priority.Jul 27 2016, 12:03 AM

Changing to unbreak since some users may depend on this.

Dzahn lowered the priority of this task from Unbreak Now! to Medium.Jul 27 2016, 1:04 AM

lowering priority because it's already hot-patched and not breaking anything

Paladox raised the priority of this task from Medium to Unbreak Now!.Jul 27 2016, 10:08 AM

Oh it dosent work, it still not adding reviewerers.

Please revert my status if I'm wrong. But it is patched but still broken.

Dzahn lowered the priority of this task from Unbreak Now! to High.Jul 27 2016, 3:00 PM

Changing to unbreak since some users may depend on this.

Oh it dosent work, it still not adding reviewerers.

Please revert my status if I'm wrong. But it is patched but still broken.

Unbreak Now! means something, and that something is not "some code review workflows may be slightly impaired". Please don't edit war on status.

Paladox assigned this task to valhallasw.

Closing as resolved.