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

Dvorapa created this task.Mar 22 2020, 3:19 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 22 2020, 3:19 PM
Xqt awarded a token.Mar 22 2020, 3:30 PM
Urbanecm added subscribers: thcipriani, hashar, Legoktm.

Unopposed for a month: @thcipriani @hashar @Legoktm Can you process, please?

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
Restricted Application added a subscriber: pywikibot-bugs-list. · View Herald TranscriptMay 2 2020, 1:45 PM
Dvorapa moved this task from Backlog to Wikimedia prod/Cloud Services issues on the Pywikibot board.
Dvorapa moved this task from Backlog to Framework on the Pywikibot-tests board.
Xqt added a subscriber: Xqt.May 2 2020, 4:58 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.

Added some basic info

Legoktm closed this task as Resolved.May 9 2020, 6:10 PM
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.

Dvorapa added a comment.EditedMay 9 2020, 10:59 PM

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

bd808 added a subscriber: bd808.May 12 2020, 12:09 AM

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.