Page MenuHomePhabricator

Migrate to SUL all non-clashing accounts
Closed, ResolvedPublic

Description

We've discussed a lot of times how to complete SUL migration but maybe we can do it by steps: four years later, I still have to tell users to merge their accounts even in trivial cases.
I think it should be too hard to unify all accounts which:

  1. can be merged without user interaction (same username and email or password, right?),
  2. would not leave any unattached account around.

The only drawback I can imagine right now is the very remote case that a user, even if there are no name conflicts, uses two or more local usernames on different wikis and could be automatically logged in with the wrong username. Nothing really bad would happen anyway.

Filing under CentralAuth because I suppose this require a script or so to be written first?


Version: unspecified
Severity: enhancement
URL: https://www.mediawiki.org/wiki/Admin_tools_development/SUL_Audit
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=14862
https://bugzilla.wikimedia.org/show_bug.cgi?id=35707

Details

Reference
bz39817

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:51 AM
bzimport set Reference to bz39817.

There are at over 10 millions usernames currently existing on a single wiki only (that could be easily unified), it seems. https://www.mediawiki.org/w/index.php?title=Admin_tools_development/SUL_Audit&oldid=653987

First pass for this is being done in these days by pgehres, while keeping an eye on database overload, about 1.4 millions in two days so far with migrateAccount.php --safe (usernames without global account and only a single local account).

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/CentralAuth.git;a=blob;f=maintenance/migrateAccount.php;h=5b82781667d37cebae788d482c660cbf62bce674;hb=HEAD

James F.: should this bug continue to be assigned to you? Perhaps Dan G. should be assigned instead?

(In reply to MZMcBride from comment #3)

James F.: should this bug continue to be assigned to you? Perhaps Dan G.
should be assigned instead?

{{done}}

Note to self, query to get users who only exist on one wiki and don't have a global account:

SELECT ln_name FROM localnames LEFT JOIN globaluser ON gu_name=ln_name WHERE gu_id IS NULL GROUP BY ln_name HAVING count(ln_name)=1 LIMIT 10;

Nemo: Is there a reason bug 54760 should be a blocker to this? Since these user's usernames won't be changing, I don't see a reason to email them?

(In reply to Kunal Mehta (Legoktm) from comment #6)

Nemo: Is there a reason bug 54760 should be a blocker to this? Since these
user's usernames won't be changing, I don't see a reason to email them?

Unattached accounts having the same name as a global account are definitely affected and some portion of them need to be merged to said global account, even if they had no email set and were not merged automatically (often users forget to set/confirm/update email on some wikis). Bug 54760 is meant to catch those easy cases to avoid having to merge 110k global users manually, which would not be amusing for stewards.

Ok, that makes sense. So the simplest case of this is users who only exist on one wiki, and are not attached (the query in comment 5). We should be able to migrating those without sending out emails.

(In reply to Kunal Mehta (Legoktm) from comment #8)

Ok, that makes sense. So the simplest case of this is users who only exist
on one wiki, and are not attached (the query in comment 5). We should be
able to migrating those without sending out emails.

Sure, that should be done first. It was already done a first time in April 2013 (about 16 millions global accounts created IIRC).

I ran the query in comment 5, and came up with 10596 users across all wikis. The result set is at /home/legoktm/one_account_no_sul.tsv on terbium.

(In reply to Kunal Mehta (Legoktm) from comment #10)

I ran the query in comment 5, and came up with 10596 users across all wikis.
The result set is at /home/legoktm/one_account_no_sul.tsv on terbium.

Hm. migrateAccount.php --safe should take care of those, shouldn't it? Can you run it now?

(In reply to Nemo from comment #11)

(In reply to Kunal Mehta (Legoktm) from comment #10)

I ran the query in comment 5, and came up with 10596 users across all wikis.
The result set is at /home/legoktm/one_account_no_sul.tsv on terbium.

Hm. migrateAccount.php --safe should take care of those, shouldn't it? Can
you run it now?

Yup, you still need a list of users to migrate though. I'm planning to run the script on Tuesday.

(In reply to Kunal Mehta (Legoktm) from comment #12)

Yup, you still need a list of users to migrate though. I'm planning to run
the script on Tuesday.

Attached a bunch of accounts today. There were also a lot of entries in localnames where the user just didn't exist, due to bug 67350.

Bryan, Reedy and others: who is able to run maintenance scripts as needed for this bug, in the coming weeks/months? Legoktm is currently busy with the coding side of things.

This script was ran a few times over the past several months and it brought the non-unified non-clashing accounts down from the thousands to the hundreds. The script will be run again after people start confirming unconfirmed email addresses over the next couple of weeks as that notification is sent out.

What notification exactly, has it been sent out already?

Well, this was done for the accounts which we know are not clashing.