Page MenuHomePhabricator

Require that CentralAuth's global groups all use lowercase internal identifiers
Closed, ResolvedPublic

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

There are a very large number of changes, so older changes are hidden. Show Older Changes

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.

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.

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

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

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 rEWMEd6d8b7e6fdb2 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 rEWMEd6d8b7e6fdb2 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 rEWMEd6d8b7e6fdb2 you Kunal's work is properly attributed.

Thanks.

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?

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

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

@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.

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.

Change 657959 had a related patch set uploaded (by Majavah; owner: Majavah):
[mediawiki/extensions/CentralAuth@master] Require that all new and modified global group names are lowercase

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

This will be enforced for new groups once @Majavah's patch from above is merged. Old groups will need to be renamed (can be done by any steward).

Change 657959 merged by jenkins-bot:
[mediawiki/extensions/CentralAuth@master] Require that all new and modified global group names are lowercase

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

Claiming this is done since no new groups can be made with non-lowercase names and WMF production has no groups with non-lowercase names.