Page MenuHomePhabricator

Grant Pywikibot-gerritbot an access to Gerrit stream (stream-events group)
Closed, ResolvedPublic

Description

To solve T186208: Magul's quick tests doesn't run anymore I decided to create a Toolforge tool for Pywikibot (either in new tool, or use existing "pywikibot" tool).

The tool needs to communicate with Gerrit these ways:

  • get Gerrit RC stream and filter patch comments for Pywikibot projects
  • based on specific patch comments get patches' Change-Id
  • send comment to those filtered patches

Event Timeline

Approved from my perspective. @Dvorapa can you create a separate account for this? I can add it to the Non-interactive users group then.

Do you mean an account on Wikitech?

"Pywikibot-gerritbot" has been created

Dvorapa renamed this task from Grant Dvorapa an access to Gerrit stream (stream-events group) to Grant Pywikibot-gerritbot an access to Gerrit stream (stream-events group).May 2 2020, 1:30 PM

Approved from my perspective. @Dvorapa can you create a separate account for this? I can add it to the Non-interactive users group then.

Ping?

"Pywikibot-gerritbot" has been created

For whatever reason I don't see that account in Gerrit...have you been able to log into Gerrit with it?

I see it in LDAP though: https://tools.wmflabs.org/ldap/user/pywikibot-gerritbot

I can login to Gerrit without any issue

I can see Pywikibot-gerritbot with UID 8212 in Gerrit.

@Dvorapa I would also create the user page on wikitech so people know what the account is for.

Legoktm claimed this task.

I can login to Gerrit without any issue

I can see Pywikibot-gerritbot with UID 8212 in Gerrit.

Weird, dunno what was wrong when I first looked at it anyways. Done!

Thank you, now comes the REST API investigation part...

Thank you, now comes the REST API investigation part...

You might find https://gerrit.wikimedia.org/r/plugins/gitiles/labs/tools/wikibugs2/+/master/grrrrit.py#226 useful as a starting point.

Thank you, now comes the REST API investigation part...

You might find https://gerrit.wikimedia.org/r/plugins/gitiles/labs/tools/wikibugs2/+/master/grrrrit.py#226 useful as a starting point.

Yeah, I already looked into it, the fetch will be similar

Making some notes here that will be easier to find than in Striker.

@Dvorapa created https://toolsadmin.wikimedia.org/tools/membership/status/783 to request Toolforge membership for the new Pywikibot-gerritbot Wikimedia developer account. I have declined that request, not to block this work, but because it should not be necessary. A Toolforge membership is needed to become a tool maintainer and create or co-maintain a Toolforge tool. Toolforge members should almost always be real humans and single user accounts. We also typically decline Toolforge membership requests for a "bot" account that is an alt of a Wikimedia user.

Instead of being a Toolforge member and tool maintainer, the Gerrit ssh key credentials connected to the Pywikibot-gerritbot shared use account should be used from inside a tool that is co-maintained by @Dvorapa and other PWB maintainers. This is what is done for a tool like wikibugs which is maintained by multiple Toolforge members, but uses the Gerrit ssh credentials of the SuchABot Wikimedia developer account to communicate with Gerrit.