Page MenuHomePhabricator

Set temporary user pattern configuration on production ahead of testwiki deployment
Closed, ResolvedPublic1 Estimated Story Points

Description

The config will be:

$wgAutoCreateTempUser['genPattern'] = '~$1';
$wgAutoCreateTempUser['matchPattern'] = '~2$1';
$wgAutoCreateTempUser['reservedPattern'] = '~2$1';

Notes:

  • We can do this before deployment, as long as we don't set 'enabled' to true
  • This means no new accounts can be registered starting with ~2
  • The 'matchPattern' means we only have to rename 2 accounts ahead of test wiki deployment
  • We may set the match pattern and reserved pattern to ~ ahead of pilot wiki deployment, if we choose to rename all users starting with ~. Being discussed in T345678.

Related Objects

Event Timeline

Change #1014526 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[operations/mediawiki-config@master] Add wgAutoCreateTempUser configuration for production

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

Change #1014559 had a related patch set uploaded (by Dreamy Jazz; author: Tchanders):

[operations/mediawiki-config@master] Prevent new user names matching the temporary account pattern

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

Change #1014559 merged by jenkins-bot:

[operations/mediawiki-config@master] Prevent new user names matching the temporary account pattern

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

Mentioned in SAL (#wikimedia-operations) [2024-03-27T14:02:53Z] <dreamyjazz@deploy1002> Started scap: Backport for [[gerrit:1014559|Prevent new user names matching the temporary account pattern (T361021 T349506)]]

Mentioned in SAL (#wikimedia-operations) [2024-03-27T14:05:56Z] <dreamyjazz@deploy1002> dreamyjazz and tchanders: Backport for [[gerrit:1014559|Prevent new user names matching the temporary account pattern (T361021 T349506)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-03-27T14:17:21Z] <dreamyjazz@deploy1002> Finished scap: Backport for [[gerrit:1014559|Prevent new user names matching the temporary account pattern (T361021 T349506)]] (duration: 14m 28s)

Change #1015072 had a related patch set uploaded (by Tchanders; author: Tchanders):

[operations/mediawiki-config@master] Scope temp user reserved pattern to temp users

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

Change #1015072 merged by jenkins-bot:

[operations/mediawiki-config@master] Scope temp user reserved pattern to temp users

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

Mentioned in SAL (#wikimedia-operations) [2024-03-27T20:07:58Z] <jhuneidi@deploy1002> Started scap: Backport for [[gerrit:1015072|Scope temp user reserved pattern to temp users (T361021 T349506)]], [[gerrit:1015095|Updates config to deploy vector 2022 (T360628)]]

Mentioned in SAL (#wikimedia-operations) [2024-03-27T20:10:30Z] <jhuneidi@deploy1002> ksarabia and jhuneidi and tchanders: Backport for [[gerrit:1015072|Scope temp user reserved pattern to temp users (T361021 T349506)]], [[gerrit:1015095|Updates config to deploy vector 2022 (T360628)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-03-27T20:26:56Z] <jhuneidi@deploy1002> Finished scap: Backport for [[gerrit:1015072|Scope temp user reserved pattern to temp users (T361021 T349506)]], [[gerrit:1015095|Updates config to deploy vector 2022 (T360628)]] (duration: 18m 57s)

$wgAutoCreateTempUser['matchPattern'] = '~2$1';
$wgAutoCreateTempUser['reservedPattern'] = '~$1';

This configuration was suggested so that:

  • Users with names starting '~' do not have to be renamed (unless the second character is '2'). So we only match a temp user if the name starts with '~2'.
  • No more users get created whose names start with '~', in case they get confused with temp accounts.

However, we can't use this configuration. That's because it will prevent users whose names start with '~' from autocreating new accounts for themselves on other wikis.

Instead, in https://gerrit.wikimedia.org/r/1015072 we set:

$wgAutoCreateTempUser['reservedPattern'] = '~2$1';

This still allows new users starting with '~', but not with '~2'. Temp accounts are highlighted in most places they are displayed in the UI, so should be easily distinguishable.

@Niharika @Madalina Does this sound acceptable?

Change #1014526 merged by jenkins-bot:

[operations/mediawiki-config@master] Add wgAutoCreateTempUser configuration for production

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

Mentioned in SAL (#wikimedia-operations) [2024-04-15T13:06:04Z] <urbanecm@deploy1002> Started scap: Backport for [[gerrit:1014526|Add wgAutoCreateTempUser configuration for production (T349506 T337090)]], [[gerrit:1019694|Change mul deployment on beta to limited version (T356169)]]

Mentioned in SAL (#wikimedia-operations) [2024-04-15T13:08:01Z] <urbanecm@deploy1002> urbanecm and arthurtaylor and dreamyjazz: Backport for [[gerrit:1014526|Add wgAutoCreateTempUser configuration for production (T349506 T337090)]], [[gerrit:1019694|Change mul deployment on beta to limited version (T356169)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-04-15T13:58:16Z] <urbanecm@deploy1002> sync-world aborted: Backport for [[gerrit:1014526|Add wgAutoCreateTempUser configuration for production (T349506 T337090)]], [[gerrit:1019694|Change mul deployment on beta to limited version (T356169)]] (duration: 52m 11s)

Mentioned in SAL (#wikimedia-operations) [2024-04-15T14:01:23Z] <urbanecm@deploy1002> Started scap: Backport for [[gerrit:1014526|Add wgAutoCreateTempUser configuration for production (T349506 T337090)]], [[gerrit:1019694|Change mul deployment on beta to limited version (T356169)]]

Mentioned in SAL (#wikimedia-operations) [2024-04-15T14:14:15Z] <urbanecm@deploy1002> urbanecm and dreamyjazz and arthurtaylor: Backport for [[gerrit:1014526|Add wgAutoCreateTempUser configuration for production (T349506 T337090)]], [[gerrit:1019694|Change mul deployment on beta to limited version (T356169)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Change #1019821 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[operations/mediawiki-config@master] Define 'useYear' as true for temp user serial mapping config

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

Mentioned in SAL (#wikimedia-operations) [2024-04-15T14:31:35Z] <urbanecm@deploy1002> Finished scap: Backport for [[gerrit:1014526|Add wgAutoCreateTempUser configuration for production (T349506 T337090)]], [[gerrit:1019694|Change mul deployment on beta to limited version (T356169)]] (duration: 30m 12s)

Change #1019821 merged by jenkins-bot:

[operations/mediawiki-config@master] Define 'useYear' as true for temp user serial mapping config

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

Mentioned in SAL (#wikimedia-operations) [2024-04-15T14:34:09Z] <dreamyjazz@deploy1002> Started scap: Backport for [[gerrit:1019821|Define 'useYear' as true for temp user serial mapping config (T349506)]]

Mentioned in SAL (#wikimedia-operations) [2024-04-15T14:36:40Z] <dreamyjazz@deploy1002> dreamyjazz: Backport for [[gerrit:1019821|Define 'useYear' as true for temp user serial mapping config (T349506)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-04-15T14:50:26Z] <dreamyjazz@deploy1002> Finished scap: Backport for [[gerrit:1019821|Define 'useYear' as true for temp user serial mapping config (T349506)]] (duration: 16m 16s)

For QA please check that temporary accounts on beta wikis still works as expected. For example:

  1. The format for temporary account usernames is ~YYYY-X, where X is an integer and YYYY is the current year
  2. Users which start with ~2 or * are marked as temporary users.
dom_walden subscribed.

For QA please check that temporary accounts on beta wikis still works as expected. For example:

  1. The format for temporary account usernames is ~YYYY-X, where X is an integer and YYYY is the current year
  2. Users which start with ~2 or * are marked as temporary users.

I can confirm on https://de.wikipedia.beta.wmflabs.org.