Page MenuHomeMiraheze

Upgrade to MediaWiki 1.40
Closed, ResolvedPublic

Description

REL1_40 will be released in late May, 2023. We will likely upgrade in late October 2023.

Pre-upgrade requirements

  • Set externallinks migration config

Upgrade process

Upgrade START date/time: 21/10/2023 - 22:00 UTC

(approx) upgrade END date/time: 22/10/2023 - 02:00 UTC

Maintenance leader:
Maintenance backup:

Availability of SRE during upgrade
@Void will be available from
@Paladox will be available from
@MacFan4000 will be available from 22:00 UTC to 04:00 UTC

Steps

  • [prior to XX:XX] Ensure backups done
  • Switch to REL1_40 branch
  • Change sitenotice
  • Run SQL/scripts

Process

  • Depool mwtask141 and update to REL1_40 couple hours prior to the maintenance window.
  • Proxy to some big wikis that use a diverse number of extensions to make sure they work.
  • Read-only will not be set for this upgrade, but it will still be recommended to the community not to edit.
  • Deploy-tool will be ran about 15 minutes before the upgrade window starts. It takes quite a while for the i18n cache + git to be updated, anywhere from 25-40 minutes.

SQL/scripts that will need run:
The following are SQL changes between 1.39 and 1.40. The biggest changes seem to in CheckUser:

mwscript sql.php loginwiki --wikidb=mhglobal /srv/mediawiki/w/extensions/CentralAuth/schema/mysql/patch-renameuser_status-unique-to-pk.sql
mwscript sql.php all /srv/mediawiki/w/extensions/CentralNotice/sql/mysql/patch-cn_notice_languages-unique-to-pk.sql
mwscript sql.php all /srv/mediawiki/w/extensions/CentralNotice/sql/mysql/patch-cn_notice_projects-unique-to-pk.sql
mwscript sql.php all /srv/mediawiki/w/extensions/CentralNotice/sql/mysql/patch-cn_notice_regions-unique-to-pk.sql
mwscript sql.php all /srv/mediawiki/w/extensions/CentralNotice/sql/mysql/patch-cn_notice_countries-unique-to-pk.sql
mwscript sql.php all /srv/mediawiki/w/extensions/CheckUser/schema/mysql/patch-cu_log_event-def.sql
mwscript sql.php all /srv/mediawiki/w/extensions/CheckUser/schema/mysql/patch-cu_private_event-def.sql
mwscript sql.php all  /srv/mediawiki/w/extensions/CheckUser/schema/mysql/patch-cu_changes-add-cuc_only_for_read_old.sql
mwscript sql.php all /srv/mediawiki/w/extensions/CheckUser/schema/mysql/patch-cu_changes-drop-cuc_comment.sql
mwscript sql.php all /srv/mediawiki/w/extensions/CheckUser/schema/mysql/patch-cu_changes-drop-cuc_user.sql
mwscript sql.php all /srv/mediawiki/w/extensions/CheckUser/schema/mysql/patch-cu_changes-drop-defaults.sql
mwscript sql.php all /srv/mediawiki/w/extensions/CheckUser/schema/mysql/patch-cu_log-drop-actor_default.sql
mwscript sql.php all /srv/mediawiki/w/extensions/CheckUser/schema/mysql/patch-cu_log-drop-cul_reason.sql
mwscript sql.php all /srv/mediawiki/w/extensions/CheckUser/schema/mysql/patch-cu_log-drop-cul_reason_id_default.sql
mwscript sql.php all /srv/mediawiki/w/extensions/CheckUser/schema/mysql/patch-cu_log-drop-cul_user.sql
mwscript sql.php extension --extension=flaggedrevs /srv/mediawiki/w/extensions/FlaggedRevs/backend/schema/mysql/patch-flaggedrevs_tracking-unique-to-pk.sql
mwscript sql.php extension --extension=growthexperiments /srv/mediawiki/w/extensions/GrowthExperiments/sql/mysql/growthexperiments_user_impact.sql
mwscript sql.php extension --extension=growthexperiments  /srv/mediawiki/w/extensions/GrowthExperiments/sql/mysql/patch-add_gemm_mentee_is_active.sql
mwscript sql.php extension --extension=wikibase /srv/mediawiki/w/extensions/Wikibase/repo/sql/mysql/archives/patch-wb_id_counters-unique-to-pk.sql

Event Timeline

Unknown Object (User) triaged this task as Low priority.Mar 16 2023, 17:28
Unknown Object (User) created this task.
Unknown Object (User) added a subtask: T10613: Test all extensions for 1.40.
Unknown Object (User) moved this task from Backlog to Features on the MediaWiki board.Mar 16 2023, 17:30
Unknown Object (User) moved this task from Backlog to Short Term on the MediaWiki (SRE) board.
Unknown Object (User) unsubscribed.Mar 18 2023, 03:22
BrandonWM updated the task description. (Show Details)
BrandonWM updated the task description. (Show Details)

REL1_40 has been branched on miraheze/mediawiki. I'll try to make it available on beta soon for extension testing.

Unknown Object (User) updated the task description. (Show Details)May 2 2023, 23:33
Unknown Object (User) subscribed.May 3 2023, 02:09
Herald removed a subscriber: Unknown Object (User). · View Herald TranscriptMay 3 2023, 02:09
Unknown Object (User) subscribed.May 3 2023, 02:09

It's safe to say this isn't happening at least this month. Even if both current requests for access are approved, both I and @AmandaCath have never done a MW upgrade here. To adapt to this situation, I suggest that we drop the insanity that is these mediawiki upgrades and go LTS while we still can. Yes, there will be even more insanity to do when upgrading from LTS to LTS, but hopefully upgrading between LTS versions will be better tested by upstream, and also if we ever have to do a LTS upgrade by that point the SRE team will have both more people and better experienced people, used to the MH way of doing things.

MacFan4000 claimed this task.

With Reception123 now having resigned, and Agent likely fully resigning sometime soon, and the fact that I would not feel comfortable trying to do this my self, I regret to announce that this upgrade will not happen.

I’ll like for us to go ahead with this. Holding back only makes upgrading in the future more difficult.

Paladox raised the priority of this task from Low to Normal.Sep 16 2023, 10:55

SQL:

extensions/GrowthExperiments/sql/mysql/growthexperiments_user_impact.sql
extensions/GrowthExperiments/sql/mysql/patch-add_gemm_mentee_is_active.sql
extensions/FlaggedRevs/backend/schema/mysql/patch-flaggedrevs_tracking-unique-to-pk.sql
extensions/CheckUser/schema/mysql/patch-cu_changes-add-cuc_only_for_read_old.sql
extensions/CheckUser/schema/mysql/patch-cu_changes-drop-cuc_comment.sql
extensions/CheckUser/schema/mysql/patch-cu_changes-drop-cuc_user.sql
extensions/CheckUser/schema/mysql/patch-cu_changes-drop-defaults.sql
extensions/CheckUser/schema/mysql/patch-cu_log-drop-actor_default.sql
extensions/CheckUser/schema/mysql/patch-cu_log-drop-cul_reason.sql
extensions/CheckUser/schema/mysql/patch-cu_log-drop-cul_reason_id_default.sql
extensions/CheckUser/schema/mysql/patch-cu_log-drop-cul_user.sql
extensions/CheckUser/schema/mysql/patch-cu_log_event-def.sql
extensions/CheckUser/schema/mysql/patch-cu_private_event-def.sql
extensions/Linter/sql/patch-linter-fix-params-null-definition.sql
extensions/Wikibase/repo/sql/mysql/archives/patch-wb_id_counters-unique-to-pk.sql
extensions/CentralAuth/schema/mysql/patch-renameuser_status-unique-to-pk.sql
extensions/CentralNotice/sql/mysql/patch-cn_notice_countries-unique-to-pk.sql
extensions/CentralNotice/sql/mysql/patch-cn_notice_languages-unique-to-pk.sql
extensions/CentralNotice/sql/mysql/patch-cn_notice_projects-unique-to-pk.sql
extensions/CentralNotice/sql/mysql/patch-cn_notice_regions-unique-to-pk.sql
maintenance/archives/patch-externallinks-el_to_path.sql

Maintenance scripts (some not related to 1.40 upgrade):

/maintenance/renameUsersMatchingPattern.php
/extensions/CheckUser/maintenance/moveLogEntriesFromCuChanges.php (LoggedUpdateMaintenance)
/extensions/CheckUser/maintenance/populateCucComment.php (LoggedUpdateMaintenance)
/extensions/CheckUser/maintenance/populateCulComment.php (LoggedUpdateMaintenance)
/extensions/GrowthExperiments/maintenance/deleteExpiredUserImpactData.php
/extensions/GrowthExperiments/maintenance/getPraiseworthyMentees.php
/extensions/GrowthExperiments/maintenance/refreshPraiseworthyMentees.php
/extensions/GrowthExperiments/maintenance/refreshUserImpactData.php
/extensions/GrowthExperiments/maintenance/updateIsActiveFlagForMentees.php
/extensions/GrowthExperiments/maintenance/updateMetrics.php
/extensions/Linter/maintenance/migrateNamespace.php (LoggedUpdateMaintenance)
/extensions/Linter/maintenance/migrateTagTemplate.php (LoggedUpdateMaintenance)
/extensions/Math/maintenance/JsonToMathML.php
/extensions/Math/maintenance/texvc.php
/extensions/PageTriage/maintenance/cleanupPageTriage.php
/extensions/PageTriage/maintenance/cleanupPageTriageLog.php
/extensions/PageTriage/maintenance/cleanupPageTriagePageTags.php
/extensions/PageTriage/maintenance/updateUserMetadata.php
/extensions/PageTriage/includes/maintenance/RemoveOldRows.php
/extensions/SocialProfile/UserStats/maintenance/updateUserStats.php
/extensions/Wikibase/repo/maintenance/EntityQuantityUnitRebuilder.php
/extensions/Wikibase/repo/maintenance/rebuildEntityQuantityUnit.php
/maintenance/compareLanguageConverterOutput.php
/maintenance/migrateExternallinks.php (LoggedUpdateMaintenance)
/maintenance/migrateRevisionCommentTemp.php (LoggedUpdateMaintenance)
/maintenance/run.php
/maintenance/language/importExtensionMessages.php
/maintenance/benchmarks/benchmarkJsonCodec.php (Benchmarker)

So the following can be done on the day the upgrade is done:

SQL:

extensions/GrowthExperiments/sql/mysql/growthexperiments_user_impact.sql
extensions/GrowthExperiments/sql/mysql/patch-add_gemm_mentee_is_active.sql
extensions/FlaggedRevs/backend/schema/mysql/patch-flaggedrevs_tracking-unique-to-pk.sql
extensions/CheckUser/schema/mysql/patch-cu_changes-add-cuc_only_for_read_old.sql
extensions/CheckUser/schema/mysql/patch-cu_changes-drop-cuc_comment.sql
extensions/CheckUser/schema/mysql/patch-cu_changes-drop-cuc_user.sql
extensions/CheckUser/schema/mysql/patch-cu_changes-drop-defaults.sql
extensions/CheckUser/schema/mysql/patch-cu_log-drop-actor_default.sql
extensions/CheckUser/schema/mysql/patch-cu_log-drop-cul_reason.sql
extensions/CheckUser/schema/mysql/patch-cu_log-drop-cul_reason_id_default.sql
extensions/CheckUser/schema/mysql/patch-cu_log-drop-cul_user.sql
extensions/CheckUser/schema/mysql/patch-cu_log_event-def.sql
extensions/CheckUser/schema/mysql/patch-cu_private_event-def.sql
extensions/Linter/sql/patch-linter-fix-params-null-definition.sql
extensions/Wikibase/repo/sql/mysql/archives/patch-wb_id_counters-unique-to-pk.sql
extensions/CentralAuth/schema/mysql/patch-renameuser_status-unique-to-pk.sql
extensions/CentralNotice/sql/mysql/patch-cn_notice_countries-unique-to-pk.sql
extensions/CentralNotice/sql/mysql/patch-cn_notice_languages-unique-to-pk.sql
extensions/CentralNotice/sql/mysql/patch-cn_notice_projects-unique-to-pk.sql
extensions/CentralNotice/sql/mysql/patch-cn_notice_regions-unique-to-pk.sql
maintenance/archives/patch-externallinks-el_to_path.sql

Maintenance script:

/extensions/CheckUser/maintenance/moveLogEntriesFromCuChanges.php
/extensions/CheckUser/maintenance/populateCucComment.php
/extensions/CheckUser/maintenance/populateCulComment.php
/extensions/GrowthExperiments/maintenance/deleteExpiredUserImpactData.php
/extensions/GrowthExperiments/maintenance/refreshPraiseworthyMentees.php
/extensions/GrowthExperiments/maintenance/refreshUserImpactData.php
/extensions/GrowthExperiments/maintenance/updateIsActiveFlagForMentees.php
/extensions/GrowthExperiments/maintenance/updateMetrics.php
/extensions/Linter/maintenance/migrateNamespace.php
/extensions/Linter/maintenance/migrateTagTemplate.php
/extensions/PageTriage/maintenance/cleanupPageTriage.php
/extensions/PageTriage/maintenance/cleanupPageTriageLog.php
/extensions/PageTriage/maintenance/cleanupPageTriagePageTags.php
/extensions/PageTriage/maintenance/updateUserMetadata.php
/extensions/PageTriage/includes/maintenance/RemoveOldRows.php
/extensions/Wikibase/repo/maintenance/rebuildEntityQuantityUnit.php

The following can be done at some point after:

Requires wgExternalLinksSchemaMigrationStage.

maintenance/migrateExternallinks.php
Requires wgCommentTempTableSchemaMigrationStage.

maintenance/migrateRevisionCommentTemp.php