Page MenuHomePhabricator

Require that CentralAuth's global groups all use lowercase internal identifiers
Open, Needs TriagePublic

Description

I want to deprecate getUserCaseDBKey() in core, and CentralAuth's GlobalGroupPermissions is one of the places it's used. I propose that the internal identifier for all global groups must be lowercase so we don't have to deal with casing at all.

Out of the global groups on Wikimedia sites, only https://meta.wikimedia.org/wiki/Special:GlobalGroupPermissions/OTRS-member is not all lowercase already. I'll ask for that to be renamed.

Event Timeline

Legoktm created this task.Aug 16 2018, 8:25 PM

Change 453262 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/WikimediaMessages@master] Rename global OTRS-member group to otrs-member

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

Note, this group is primarily used by various abuse filters, they should be checked to see if this change will require filter updates.

@Huji , @Daimona do you have any suggestions on how we can search AbuseFilters? Should we just do a database query?

@Legoktm well, if you want to search across all wikis you need a DB query, see for instance T193894. Once you got the result, you can search on single wikis via the form on Special:AbuseFilter. The only case sensitive option there is using a regex.
My only concern is that we should properly notice users of the change so that they won't use the uppercase name anymore.

Change 453262 merged by jenkins-bot:
[mediawiki/extensions/WikimediaMessages@master] Rename global OTRS-member group to otrs-member

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

Note that there's an Image-reviewer local group at commons that might be wise to rename as well (and its members moved from one group to another using the migrateUserGroups.php script).

Ergh was this intentional to merge a change which will likely break several filters? CC'ing @MarcoAurelio

It was +1ed and it's already breaking stuff (links to pages, etc.) due to the global group rename. If you want that reverted, I can do it.

Created a revert patch.

OTOH. Since the group is already renamed in the database, ain't that already breaking the filters? Shall the global group be renamed back to OTRS-member while the queries are done?

Change 453378 had a related patch set uploaded (by MarcoAurelio; owner: MarcoAurelio):
[mediawiki/extensions/WikimediaMessages@master] Reinstate "Rename global OTRS-member group to otrs-member"

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

I'd also be fine with quickly changing all affected filters, but we'd need a list to do it. Is there someone who is able to do it quickly? Depending on how many results we get, we'll then be able to decide what is the better thing to do.

Is it possible to launch a DB query against all Wikimedia wikis databases? (cc. @Reedy )

Shall we rename the global group back until such querying and fixing is resolved?

Regards.

Is it possible to launch a DB query against all Wikimedia wikis databases? (cc. @Reedy )
Shall we rename the global group back until such querying and fixing is resolved?
Regards.

Querying what from where, exactly?

If I understand rightly, we would like to know how many wikis are using OTRS-member in their filters so we can fix them to use the new otrs-member group name. I guess @Daimona can explain better than me. Thanks.

I guess it's possible, we need the same thing as in T193894, changing the WHERE condition to search for OTRS-member of course.

I changed enwiki's 642; but as the primary purpose of this group is to feed a variable for abusefilters - getting a handle on what is impacted should not be delayed

and for any project that localized links for these messages:

"group-otrs-member": "OTRS members",
"group-otrs-member-member": "{{GENDER:$1|OTRS member}}",
"grouppage-otrs-member":

example: https://en.wikipedia.org/wiki/MediaWiki:Group-OTRS-member

These links will all be broken, much less critical of a fix then the abuse filters though

It looks like the related default text for MediaWiki:Group-otrs-member-member does not exist either

It looks like the related default text for MediaWiki:Group-otrs-member-member does not exist either

I reverted the patch creating those until all this is sorted out first (and even it if stayed, it'd not be avalaible for production wikis until the next MediaWiki trains in a week or so). I'm also thinking on reverting the global group rename until we know exactly how many wikis are impacted by the change; but I don't want to go back-and-forth with renames and reverts.

It looks like the related default text for MediaWiki:Group-otrs-member-member does not exist either

I reverted the patch creating those until all this is sorted out first (and even it if stayed, it'd not be avalaible for production wikis until the next MediaWiki trains in a week or so). I'm also thinking on reverting the global group rename until we know exactly how many wikis are impacted by the change; but I don't want to go back-and-forth with renames and reverts.

Sorry, I didn't communicate well. I was planning to sync out the messages change with a scap later today.

I guess it's possible, we need the same thing as in T193894, changing the WHERE condition to search for OTRS-member of course.

Thanks, running a query now...

Huji added a subtask: Restricted Task.EditedAug 17 2018, 3:42 PM

@Legoktm please follow-up on the query thing in T202145.

Jeff_G added a subscriber: Jeff_G.Aug 17 2018, 5:19 PM
RP88 added a subscriber: RP88.Aug 17 2018, 8:14 PM

@Huji enwiki 635 has been updated as well (note it was a deleted filter)

Huji added a comment.Aug 17 2018, 9:13 PM

Thanks. Just in case someone undeletes that filter, it is best to keep it in a functional sate.

MarcoAurelio added a comment.EditedAug 18 2018, 10:04 AM

On a second thought. Like I've said above, given that the user group has been renamed already (thus filters using the old OTRS-member syntax are in theory failing), I don't think 568777c47511 nor d6d8b7e6 for what is worth is going to cause any issues (to the contrary, it'll help Special:GlobalUsers and related user lists to display correctly the name of the "new" user group).

However I think we shall just not only merge d6d8b7e6 but after that immediately cherry-pick that change to the current versions group[0-2] wikis are running so the change uniformly applies to the whole WMF wikis at once.

For that, I'm not re-merging the change now; the merge on master and on the relevant wmf/ branches should happen coordinated (and preferably be handled by someone who can do the whole process themself; scap etc.).

@Legoktm Was this what you had in mind at T202095#4509968 ? I'll do a git commit --amend --author=... on d6d8b7e6 you Kunal's work is properly attributed.

Thanks.

Huji added a comment.Aug 18 2018, 5:26 PM

Of note, almost all filters that used "OTRS-member" have been revised to use "otrs-member". So the sooner we re-instate this change the better.

@Huji how was this determined? Did you manage to query every filter on every project?

Huji added a comment.Aug 18 2018, 8:48 PM

I did not do it personally; we have a process for it. I will add you to the child task momentarily.

Could you please add me as well? Thanks.

Change 453378 merged by jenkins-bot:
[mediawiki/extensions/WikimediaMessages@master] Reinstate "Rename global OTRS-member group to otrs-member"

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

I'm trying to cherry-pick the reinstate patch to wmf/1.32.0-wmf.16 and 18 and, for .16 it says "merge conflict" and for wmf.18 the branch is not in gerrit yet.

Change 453877 had a related patch set uploaded (by MarcoAurelio; owner: Legoktm):
[mediawiki/extensions/WikimediaMessages@wmf/1.32.0-wmf.16] Reinstate "Rename global OTRS-member group to otrs-member"

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

Reedy added a comment.Aug 19 2018, 9:46 PM

I'm trying to cherry-pick the reinstate patch to wmf/1.32.0-wmf.16 and 18 and, for .16 it says "merge conflict" and for wmf.18 the branch is not in gerrit yet.

.18 won't be branched till tuesday. But as it's in master, it'll be in .18 when it's branched

.16 would have to be cherry picked and resolved locally. Chances are it's minimal conflicts

MarcoAurelio added a comment.EditedAug 19 2018, 9:51 PM

@Reedy it was i18n/wikimedia/my.json. Resolved locally and uploaded. Scheduled for SWAT.

Change 453877 merged by jenkins-bot:
[mediawiki/extensions/WikimediaMessages@wmf/1.32.0-wmf.16] Reinstate "Rename global OTRS-member group to otrs-member"

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

Mentioned in SAL (#wikimedia-operations) [2018-08-20T19:00:04Z] <jforrester@deploy1001> Synchronized php-1.32.0-wmf.16/extensions/WikimediaMessages/: SWAT T202095 Reinstate "Rename global OTRS-member group to otrs-member" (will need scap sync later) (duration: 00m 49s)

Change is merged on master and on the current wmf branch of MediaWiki. However a localisation cache update must be run for the changes to be visible (or we can wait ~12 hours and then they'll start to appear).

Mentioned in SAL (#wikimedia-operations) [2018-08-20T19:03:59Z] <jforrester@deploy1001> Started scap: i18n sync for WikimediaMessages clean-up following T202095

Mentioned in SAL (#wikimedia-operations) [2018-08-20T19:35:12Z] <jforrester@deploy1001> Finished scap: i18n sync for WikimediaMessages clean-up following T202095 (duration: 31m 12s)

Thanks @Jdforrester-WMF - it displays correctly now as far as I could see.

Great. Happy to have helped.

@Huji Please add me as well, thanks.

Jony added a subscriber: Jony.Jan 5 2019, 6:04 PM
Daimona closed subtask Restricted Task as Resolved.Mar 8 2019, 6:06 PM

For those who cannot see it, the subtask regarding AbuseFilter is now resolved, so that's not a blocker anymore.