Page MenuHomePhabricator

Read from and write to `actor` table in AbuseFilter
Open, LowPublic

Description

rMW27c61fb1e94d: Add `actor` table and code to start using it changed the database schema throughout MediaWiki. Tables to migrate:

  • abuse_filter: af_user & af_user_text -> af_actor Patch-For-Review
  • abuse_filter_log: afl_user & afl_user_text -> afl_actor
  • abuse_filter_history: afh_user & afh_user_text -> afh_actor Patch-For-Review

Additionally, there are several reads from recentchanges and revision.

To do:

Event Timeline

Note to me or anyone: should global filter hits be logged with "interwiki" usernames?

If I understand correctly, you're asking about hits on actions on the local wiki by a local user. In that situation, the local user should be logged as the one who attempted the action, no need for an interwiki username.

If a global filter is triggered on a remote wiki, the hit is logged both on that wiki and on the central wiki (metawiki for WMF wikis). It's clear that the former should be just a local username but what about the latter? I think the hits there should logged with external usernames.

Ah, ok.

Meta is a special case, I believe we ensure that all SUL accounts exist locally on Meta at creation, and all accounts should be SUL now. So in that case you could use the local name.

For a more general case where those guarantees don't hold, though, you're right that you'd probably want to use interwiki names in the global log.

Change 445185 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/AbuseFilter@master] [DNM][WIP][POC] Use actor table in AbuseFilter

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

Change 445420 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/AbuseFilter@master] [Unfinished] Migrate abuse_filter_log table to actor

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

Change 459990 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/AbuseFilter@master] Migrate abuse_filter_log table to actor

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

Change 445420 abandoned by Matěj Suchánek:
[Unfinished] Migrate abuse_filter_log table to actor

Reason:
Superseded with Ic7d5175b6ffd255ecc7760414ab19f8db3e07950

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

Change 489374 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/core@master] Move migrateActors.php to includes

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

Change 489374 merged by jenkins-bot:
[mediawiki/core@master] Move migrateActors.php to includes

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

Will it be fixed for renamings before patch? Still not fixed for me, see T193504

Change 445185 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/AbuseFilter@master] Use actor table in AbuseFilter

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

Reconsidering after the architecture review, in case it will make it easier to migrate abuse_filter_log. Low priority otherwise.

Change 681867 had a related patch set uploaded (by Daniel Kinzler; author: Tim Starling):

[mediawiki/core@master] Split a base class out of ActorMigration

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