Page MenuHomePhabricator

Do not save data for the system users to cuci_user
Closed, ResolvedPublic1 Estimated Story PointsPRODUCTION ERROR

Description

As detailed in T374994, CheckUser is attempting to include data about the AbuseFilter filter user in the cuci_user table. This fails because the system user name is localised per-wiki and has no global account.

If any system user has no central account, we should ignore this and not send an error to the logging channels. This is because there are many examples of system users without a central account on WMF wikis.

Error
message
Unable to find central ID for local user Фільтр зловживань when recording action in cuci_user table.

Related Objects

Event Timeline

Dreamy_Jazz claimed this task.
Dreamy_Jazz set the point value for this task to 1.
Dreamy_Jazz added a project: AbuseFilter.
Dreamy_Jazz moved this task from Untriaged to Sep 2024 on the Wikimedia-production-error board.

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

[mediawiki/extensions/CheckUser@master] Skip error logs on central account for AbuseFilter filter user

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

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

[integration/config@master] Zuul: [mediawiki/extensions/CheckUser] Add AbuseFilter dependency

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

Change #1073743 merged by jenkins-bot:

[integration/config@master] Zuul: [mediawiki/extensions/CheckUser] Add AbuseFilter dependency

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

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

[mediawiki/extensions/CheckUser@master] Skip error logs on central account for AbuseFilter filter user

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

I suggest excluding all system users with isSystemUser instead of special handling this specific case.

Change #1073741 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Skip error logs on central account for AbuseFilter filter user

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

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

[mediawiki/extensions/CheckUser@master] Skip error logs on central account for AbuseFilter filter user

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

I suggest excluding all system users with isSystemUser instead of special handling this specific case.

Excluding the error logs for system users in general could work, but I feel like AbuseFilter is a specific exception to the rule of system users sharing the same username (and therefore being able to have a central account).

I can't seem to find the task, but my understanding is that the filter user having a different username for each wiki is a bit of an exception to the normal. For example, the MediaWiki maintenance script system user is not localised.

I'd propose that if other examples appear, we can change the check to just check for a system user. However, otherwise I'd prefer to keep just this limited exception so that we can still see examples of other system users not having central accounts.

This will be hard to test locally and as the QA queue is rather full, I propose that we check that the logs no longer appear once this is on production.

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

[mediawiki/extensions/CheckUser@master] Skip error logs on central account for AbuseFilter filter user

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

I suggest excluding all system users with isSystemUser instead of special handling this specific case.

Excluding the error logs for system users in general could work, but I feel like AbuseFilter is a specific exception to the rule of system users sharing the same username (and therefore being able to have a central account).

I can't seem to find the task, but my understanding is that the filter user having a different username for each wiki is a bit of an exception to the normal. For example, the MediaWiki maintenance script system user is not localised.

I'd propose that if other examples appear, we can change the check to just check for a system user. However, otherwise I'd prefer to keep just this limited exception so that we can still see examples of other system users not having central accounts.

There are some more examples now:

  • mswiki Babel AutoCreate
  • moswiki Maintenance script
  • lrcwiki Global rename script
  • kowiki 바벨 자동만듦

There are many more as well (https://logstash.wikimedia.org/goto/71a12a514aa5a8c94d51c3ceaf170471).

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

[mediawiki/extensions/CheckUser@master] Skip error logs on no central account for system users

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

Dreamy_Jazz renamed this task from Do not save data for the AbuseFilter system user to cuci_user to Do not save data for the system users to cuci_user.Sep 27 2024, 11:17 AM
Dreamy_Jazz updated the task description. (Show Details)

Thanks. I've uploaded a new patch that will skip the error log for all system users (not just AbuseFilter).

Change #1076175 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Skip error logs on no central account for system users

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

This will be hard to test locally and as the QA queue is rather full, I propose that we check that the logs no longer appear once this is on production.

Same as above -- let's check if the message goes away after next week's train.

https://logstash.wikimedia.org/goto/53134cd3698fa55fb2c7f7db98353ac0 shows that we are not getting these errors for system users anymore.