Page MenuHomePhabricator

Actor support for social tools
Open, Needs TriagePublic

Description

Need to add a new _actor column to all supported extensions' relevant tables and potentially use it, depending on the value of $wgActorTableSchemaMigrationStage. MediaWiki-extensions-Renameuser has a nice method called getActorMigrationStage in /extensions/Renameuser/includes/RenameuserSQL.php that we'll likely want to copy over to the relevant classes.

Also need a new, relevant index.

When would it be safe to ditch the "older" _user/_user_text columns; MW 1.34 or 1.35?

mw:Actor migration

Affected extensions and tables:

  1. AJAXPollajaxpoll_vote (stores username and IP address but not user ID?!)
  2. Challenge — not really maintained right now, so not a huge priority; challenge, challenge_rate, challenge_user_record
    1. https://gerrit.wikimedia.org/r/561349
  3. CommentsComments, Comments_block, Comments_Vote
    1. CommentsPage#getComments does a LEFT JOIN againt SocialProfile's user_stats.stats_user_id when SP is installed
  4. FanBoxesfantag, user_fantag
    1. https://gerrit.wikimedia.org/r/561868/ (Open as of 5 January 2020)
  5. LinkFilterlink
    1. https://gerrit.wikimedia.org/r/521982
    2. https://gerrit.wikimedia.org/r/561333/ (Open as of 5 January 2020)
  6. MediaWikiChatchat, chat_users (used on Brickimedia)
    1. Per discussion with @lcawte on 2 January 2020, we'll likely be dropping this extension and not implementing actor support for it
  7. MiniInviteuser_email_track
    1. https://gerrit.wikimedia.org/r/562070
  8. NewSignupPageuser_register_track
    1. https://gerrit.wikimedia.org/r/562267 (Open as of 6 January 2020)
    2. https://gerrit.wikimedia.org/r/562268 (SocialProfile part; open as of 6 January 2020)
  9. PictureGamepicturegame_images, picturegame_votes
    1. https://gerrit.wikimedia.org/r/561955 (Open as of 5 January 2020)
  10. PollNYpoll_question, poll_user_vote
    1. https://gerrit.wikimedia.org/r/561594/ (Open as of 5 January 2020)
    2. Also needs changes in SocialProfile's /extensions/SocialProfile/UserProfile/includes/UserProfilePage.php which queries one of PollNY's DB tables directly via the user ID
  11. QuizGamequizgame_answers, quizgame_questions, quizgame_user_view
  12. SocialProfileuser_board, user_profile (only stores user ID as up_user_id currently, has no knowledge of the user's name), user_fields_privacy (ditto), user_points_archive, user_points_monthly, user_points_weekly (need to remember to keep the column name the same between these 3 tables!), user_stats, user_system_messages, gift, user_gift, user_system_gift, user_relationship, user_relationship_request
  13. SiteMetrics — doesn't introduce any custom tables on its own, but references many extension and core-created tables, like revision
    1. https://gerrit.wikimedia.org/r/561329/ (Open as of 5 January 2020)
  14. SportsTeams — sport_favorite
    1. This is trickier than what it looks at first, because at least SportsTeams#getUsersByPoints does a LEFT JOIN against SocialProfile's user_stats table and specifically its stats_user_id column, and needless to say, we can't do a direct comparison between an actor ID and a user ID as they aren't the same thing! So this can't be done until user_stats has an actor column...
  15. UserStatususer_status, user_status_vote
    1. https://gerrit.wikimedia.org/r/561411
    2. https://gerrit.wikimedia.org/r/561413 (SocialProfile part, open as of 5 January 2020)
  16. Video (non-WMF)oldvideo, video
    1. https://gerrit.wikimedia.org/r/561901 (Open as of 5 January 2020)
  17. WikiForum — not really maintained right now by us, but quite a few people seem to be using it; also, it's a mess; wikiforum_category, wikiforum_forums, wikiforum_threads, wikiforum_replies (all tables store UIDs + IPs, but not user names)
    1. https://gerrit.wikimedia.org/r/562053 (Open as of 5 January 2020)
  18. VoteNYVote (stores username and IP address but not user ID?!)
    1. https://gerrit.wikimedia.org/r/525330/
    2. https://gerrit.wikimedia.org/r/561326/
    3. Also note the need for changes in extensions which directly query the Vote table, like BlogPage and also SocialProfile (https://gerrit.wikimedia.org/r/561341/ and https://gerrit.wikimedia.org/r/561342/, respectively)
      1. Ideally things like BlogPage or SocialProfile wouldn't query the DB table directly...

Details

Related Gerrit Patches:
mediawiki/extensions/SocialProfile : masterFix QuizGame integration in UserProfilePage to not refer to the now-dropped user ID column in the quizgame_questions table
mediawiki/extensions/SocialProfile : masterFix a very fatal typo
mediawiki/extensions/BlogPage : masterDon't use user_stats.stats_user_id anymore for it's gone, use actor stuff instead
mediawiki/extensions/SocialProfile : masterFix broken migrateOldUserBoardUserColumnsToActor script
mediawiki/extensions/LinkFilter : masterPost-actor cleanup: drop Renameuser hook and the last references to DB colums which are now gone
mediawiki/extensions/LinkFilter : masterUse actor stuff in the Comments support in LinkPage
mediawiki/extensions/FanBoxes : masterPost-actor cleanup and whatnot
mediawiki/extensions/SiteMetrics : masterRemove last remains of user IDs in DB queries, replace with actor references
mediawiki/extensions/Comments : masterActor support, now requires MW 1.34+
mediawiki/extensions/NewSignupPage : masterActor support (in a breaking manner), requires MW 1.34+ and manual DB admin intervention if user_register_track table existed
mediawiki/extensions/WikiForum : masterActor support, now requires MW 1.34(+)
mediawiki/extensions/PictureGame : masterActor support, requires MW 1.34+
mediawiki/extensions/Video : masterActor support, requires MW 1.34+
mediawiki/extensions/FanBoxes : masterActor support, requires MW 1.34+
mediawiki/extensions/PollNY : masterMigrate to using actor IDs and passing them around, thus requiring MW 1.34+
mediawiki/extensions/AJAXPoll : masterActor support, now requires MW 1.34(+)
mediawiki/extensions/QuizGame : masterActor support, now requires MW 1.34+
mediawiki/extensions/SocialProfile : masterActor support, now requires MW 1.34+
mediawiki/extensions/SportsTeams : masterActor support, PostgreSQL support, documentation tweaks, random bug fixes esp. wrt. the UserStatus integration
mediawiki/extensions/ImageRating : masterActor support, requires MW 1.34+
mediawiki/extensions/SocialProfile : masterUser actor IDs when dealing with VoteNY's Vote table
mediawiki/extensions/SocialProfile : masterAdjust UserActivity#setNetworkUpdates for recent UserStatus actor-related changes
mediawiki/extensions/MiniInvite : masterActor support, now requires MW 1.34(+)
mediawiki/extensions/UserStatus : masterUse actor stuff exclusively, require MW 1.34+
mediawiki/extensions/Challenge : masterActor support and more
mediawiki/extensions/LinkFilter : masterActor support
mediawiki/extensions/VoteNY : masterActor support
mediawiki/extensions/SocialProfile : masterActor support in things which use(d to use) rev_user/rev_user_text & log_user/log_user_text

Event Timeline

ashley created this task.Jul 5 2019, 4:40 PM

Change 521982 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/LinkFilter@master] [DNM][WIP?][OMGWTFBBQ] Actor support

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

ashley updated the task description. (Show Details)Jul 21 2019, 2:24 PM

Change 525330 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/VoteNY@master] Actor support

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

Change 525963 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/SocialProfile@master] Actor support in things which use(d to use) rev_user/rev_user_text

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

Change 525963 merged by jenkins-bot:
[mediawiki/extensions/SocialProfile@master] Actor support in things which use(d to use) rev_user/rev_user_text & log_user/log_user_text

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

Change 525330 merged by jenkins-bot:
[mediawiki/extensions/VoteNY@master] Actor support

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

Change 521982 merged by jenkins-bot:
[mediawiki/extensions/LinkFilter@master] Actor support

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

Change 561342 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/SocialProfile@master] User actor IDs when dealing with VoteNY's Vote table

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

Change 561349 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/Challenge@master] Actor support and more

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

Change 561349 merged by jenkins-bot:
[mediawiki/extensions/Challenge@master] Actor support and more

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

Change 561411 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/UserStatus@master] Use actor stuff exclusively, require MW 1.34+

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

Change 561411 merged by jenkins-bot:
[mediawiki/extensions/UserStatus@master] Use actor stuff exclusively, require MW 1.34+

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

Change 561413 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/SocialProfile@master] Adjust UserActivity#setNetworkUpdates for recent UserStatus actor-related changes

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

Change 561594 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/PollNY@master] Migrate to using actor IDs and passing them around, thus requiring MW 1.34+

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

ashley updated the task description. (Show Details)Jan 2 2020, 10:33 AM

Change 561868 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/FanBoxes@master] Actor support, requires MW 1.34+

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

Change 561901 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/Video@master] Actor support, requires MW 1.34+

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

Change 561955 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/PictureGame@master] Actor support, requires MW 1.34+

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

Change 562053 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/WikiForum@master] Actor support, now requires MW 1.34(+)

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

Change 562070 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/MiniInvite@master] Actor support, now requires MW 1.34(+)

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

ashley updated the task description. (Show Details)Jan 5 2020, 10:34 PM

Change 562070 merged by jenkins-bot:
[mediawiki/extensions/MiniInvite@master] Actor support, now requires MW 1.34(+)

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

Change 562267 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/NewSignupPage@master] Actor support (in a breaking manner), requires MW 1.34+ and manual DB admin intervention if user_register_track table existed

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

Change 561413 merged by jenkins-bot:
[mediawiki/extensions/SocialProfile@master] Adjust UserActivity#setNetworkUpdates for recent UserStatus actor-related changes

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

ashley updated the task description. (Show Details)Jan 6 2020, 10:51 PM

Change 562907 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/AJAXPoll@master] Actor support, now requires MW 1.34(+)

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

Change 564787 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/ImageRating@master] Actor support, requires MW 1.34+

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

Change 561342 abandoned by Jack Phoenix:
User actor IDs when dealing with VoteNY's Vote table

Reason:
Will submit this as a part of the new version of https://gerrit.wikimedia.org/r/561337/

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

Change 565779 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/SocialProfile@master] Actor support, now requires MW 1.34+

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

Change 565783 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/QuizGame@master] Actor support, now requires MW 1.34+

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

Change 566368 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/SportsTeams@master] Actor support, PostgreSQL support, documentation tweaks, random bug fixes esp. wrt. the UserStatus integration

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

Change 566372 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/Comments@master] Actor support, now requires MW 1.34+

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

Change 564787 merged by jenkins-bot:
[mediawiki/extensions/ImageRating@master] Actor support, requires MW 1.34+

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

Change 566368 merged by jenkins-bot:
[mediawiki/extensions/SportsTeams@master] Actor support, PostgreSQL support, documentation tweaks, random bug fixes esp. wrt. the UserStatus integration

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

Change 565779 merged by Jack Phoenix:
[mediawiki/extensions/SocialProfile@master] Actor support, now requires MW 1.34+

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

Change 565783 merged by Jack Phoenix:
[mediawiki/extensions/QuizGame@master] Actor support, now requires MW 1.34+

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

Change 562907 merged by jenkins-bot:
[mediawiki/extensions/AJAXPoll@master] Actor support, now requires MW 1.34(+)

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

Change 561594 merged by Jack Phoenix:
[mediawiki/extensions/PollNY@master] Migrate to using actor IDs and passing them around, thus requiring MW 1.34+

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

Change 561868 merged by Jack Phoenix:
[mediawiki/extensions/FanBoxes@master] Actor support, requires MW 1.34+

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

Change 561901 merged by jenkins-bot:
[mediawiki/extensions/Video@master] Actor support, requires MW 1.34+

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

Change 561955 merged by Jack Phoenix:
[mediawiki/extensions/PictureGame@master] Actor support, requires MW 1.34+

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

Change 562053 merged by jenkins-bot:
[mediawiki/extensions/WikiForum@master] Actor support, now requires MW 1.34(+)

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

Change 562267 merged by Jack Phoenix:
[mediawiki/extensions/NewSignupPage@master] Actor support (in a breaking manner), requires MW 1.34+ and manual DB admin intervention if user_register_track table existed

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

Change 566372 merged by jenkins-bot:
[mediawiki/extensions/Comments@master] Actor support, now requires MW 1.34+

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

Change 567378 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/SiteMetrics@master] Remove last remains of user IDs in DB queries, replace with actor references

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

Change 567378 merged by Jack Phoenix:
[mediawiki/extensions/SiteMetrics@master] Remove last remains of user IDs in DB queries, replace with actor references

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

Change 567383 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/FanBoxes@master] Post-actor cleanup and whatnot

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

Change 567383 merged by Jack Phoenix:
[mediawiki/extensions/FanBoxes@master] Post-actor cleanup and whatnot

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

Change 567386 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/LinkFilter@master] Use actor stuff in the Comments support in LinkPage

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

Change 567386 merged by Jack Phoenix:
[mediawiki/extensions/LinkFilter@master] Use actor stuff in the Comments support in LinkPage

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

Change 567394 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/LinkFilter@master] Post-actor cleanup: drop Renameuser hook and the last references to DB colums which are now gone

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

Change 567394 merged by Jack Phoenix:
[mediawiki/extensions/LinkFilter@master] Post-actor cleanup: drop Renameuser hook and the last references to DB colums which are now gone

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

Change 569843 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/SocialProfile@master] Fix broken migrateOldUserBoardUserColumnsToActor script

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

Change 569843 merged by Jack Phoenix:
[mediawiki/extensions/SocialProfile@master] Fix broken migrateOldUserBoardUserColumnsToActor script

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

Change 570657 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/BlogPage@master] Don't use user_stats.stats_user_id anymore for it's gone, use actor stuff instead

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

Change 570657 merged by Jack Phoenix:
[mediawiki/extensions/BlogPage@master] Don't use user_stats.stats_user_id anymore for it's gone, use actor stuff instead

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

Change 570819 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/SocialProfile@master] Fix a very fatal typo

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

Change 570819 merged by Jack Phoenix:
[mediawiki/extensions/SocialProfile@master] Fix a very fatal typo

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

Change 572490 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/SocialProfile@master] Fix QuizGame integration in UserProfilePage to not refer to the now-dropped user ID column in the quizgame_questions table

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

Change 572490 merged by Jack Phoenix:
[mediawiki/extensions/SocialProfile@master] Fix QuizGame integration in UserProfilePage to not refer to the now-dropped user ID column in the quizgame_questions table

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