Page MenuHomePhabricator

Strikerbot adds a welcome message to a user's talk page every time that an approved membership request is edited
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):
Check Recent Changes on WikiTech

What happens?:
StrikerBot is double posting welcome messages to user talk pages

What should have happened instead?:
The message should only be posted once

strikerbot.PNG (572×957 px, 116 KB)

Event Timeline

looks like none of the accounts it double-welcomed actually exist on Wikitech

looks like none of the accounts it double-welcomed actually exist on Wikitech

Being a Toolforge member without having an attached account on wikitech is pretty common in the current era. This state indicates that the Developer account was created via https://toolsadmin.wikimedia.org/ and that is has never been used to authenticate to wikitech.

The bot account creates these welcome messages as a part of the membership approval process managed at https://toolsadmin.wikimedia.org/tools/membership/. There is no differed work queue for this, so it seems likely that the duplication was caused somehow by humans double approving the membership requests. I will try to see if I can find any sign in the debugging logs for Striker or it's database that this is actually what happened.

looks like none of the accounts it double-welcomed actually exist on Wikitech

Being a Toolforge member without having an attached account on wikitech is pretty common in the current era. This state indicates that the Developer account was created via https://toolsadmin.wikimedia.org/ and that is has never been used to authenticate to wikitech.

Ah ok, it just seemed odd.

Looks like all of the requests were marked as resolved by @LucasWerkmeister and then the welcomed again when they were asked to link a Phabricator account so it would've been double approved.
Yamen (1365)
Hyruspex (1366)
Nassima Chahboun (1367)
Lupin~fr (1368)
Darmo117 (1369)

there's also Devnull (1324) which seems to have been resolved on the 16th despite only getting welcomed on the 20th.

Looks like all of the requests were marked as resolved by @LucasWerkmeister and then the welcomed again when they were asked to link a Phabricator account so it would've been double approved.
Yamen (1365)
Hyruspex (1366)
Nassima Chahboun (1367)
Lupin~fr (1368)

Looking at the timestamps on https://toolsadmin.wikimedia.org/tools/membership/status/1368 I think the mystery of what happened is solved for me. Lucas approved the request at 2022-11-19 10:50 which resulted in the original welcome message. Then at 2022-11-19 13:05 came back and added a note asking the user to connect their Phabricator account (related: T172899).

The real issue here is that Striker allows an admin to add additional notes to an access request that is in the "approved" state and also does not compare prior state to current state before taking actions on the request.status == AccessRequest.APPROVED condition. Each time an access request is updated while in approved state the backend code will update the requesting user's OpenStack project membership and post a welcome message on their talk page.

Ah, sorry for the confusion – indeed I accepted the users, and then saw (looking through some other requests) that @rook usually asks people to attach their Phabricator accounts, and so I sent additional comments to the users who didn’t have a Phabricator account attached yet.

bd808 renamed this task from Strikerbot is sending double welcome messages to user's talk pages to Strikerbot adds a welcome message to a user's talk page every time that an approved membership request is edited.Nov 21 2022, 10:51 PM

Ah, sorry for the confusion

No worries Lucas! The software did a weird thing because I wrote it poorly, not because you used it wrong. ;)

taavi moved this task from Backlog to Doing on the Striker board.

Change 1009537 had a related patch set uploaded (by Majavah; author: Majavah):

[labs/striker@master] Fix double-approving users

https://gerrit.wikimedia.org/r/1009537

Change 1009537 merged by jenkins-bot:

[labs/striker@master] Fix double-approving users

https://gerrit.wikimedia.org/r/1009537

There is a fix live now. I'm fairly sure it won't work properly before T144943 is fixed, but that's fine I think.