In T177825 it was discovered T177825#3685628 that the maintenance script was run more than once (I vaguely recall this during deployment, but I thought the failure was before any were processed).
The script, it appears, was not meant to handle the preference in a mixed-state (i.e. some with usernames, others with user ids).
We need three things in order to restore the blocklists:
- Recover the preference from the backup for only the users who have a 0 (or a series of 0's separated by a newline character, there could be more than 2) (i.e. only users who have not already updated their blacklist).
Update the maintenance script to support mixed-stateFigure out why it failed and prevent it from happening again.
- Apply the data to production and run the updated maintenance script.