Page MenuHomeMiraheze

Upgrade to MediaWiki 1.37.0
Closed, ResolvedPublic

Description

So I can list all the work Amir is creating.

  • clean auto review logs

09:09:54 <Amir1> delete from logging where log_type = 'review' and log_action = 'approve-a' and log_timestamp like '2018%' limit 10000 - after ensuring 1.36 is everywhere (done on test3)

Unfixed blockers:

  • PdfBook: generated PDF files result in failed to load when attempting to view them

Former blockers:


Upgrade process

Upgrade START date/time: 07/12/2021, 17:00 UTC

(approx) upgrade END date/time: 07/12/2021, 20:00 UTC (estimated time, 3 hours should be enough, better to give a longer estimate)

Steps

  1. [16:59] sudo service jobrunner stop [@RhinosF1] DONE
  2. [17:00] depool mw11 (backend.set_health mw11 sick) [@Paladox]
  3. [17:01] python3 /usr/local/bin/mwupgradetool [@Universal_Omega]
    1. steps done by the script
  4. (WHEN PROMPTED) Merge Puppet PR to flip branch - https://github.com/miraheze/puppet/pull/2141 [@Reception123]
    1. (WHEN PROMPTED) - read only PR - https://github.com/miraheze/mw-config/pull/4245
  5. follow script
  6. Update mathoid on mw* [@Universal_Omega]
  7. repool mw11 (backend.set_health mw11 auto) [@Reception123]
  8. sudo service jobrunner start [@Universal_Omega]
  9. Run SQL changes [@Universal_Omega]
  10. https://github.com/miraheze/mw-config/pull/4260 [@Universal_Omega]
  11. https://github.com/miraheze/mw-config/pull/4261 [@Universal_Omega]
  12. https://github.com/miraheze/mw-config/pull/4263 [@Universal_Omega]

Post upgrade work:

  • flagged revs logs cleanup
  • image metadata
  • JMIGRATE

SQL/Maintenance scripts:

mwscript sql.php all /srv/mediawiki/w/maintenance/archives/patch-change_tag-rename-indexes.sql

mwscript sql.php all /srv/mediawiki/w/maintenance/archives/patch-page-rename-name_title-index.sql

mwscript sql.php all /srv/mediawiki/w/maintenance/archives/patch-revision-rename-index.sql

mwscript sql.php all --query="ALTER TABLE revision ALTER rev_timestamp DROP DEFAULT;"

mwscript refreshImageMetadata.php all --force --verbose

mwscript extensions/FlaggedRevs/pruneRevData.php extension --extension=flaggedrevs --prune

mwscript sql.php all --query="DELETE FROM logging WHERE log_type = 'review' AND log_action = 'approve-a';"

mwscript sql.php all --query="DROP TABLE IF EXISTS flaggedimages;"

mwscript extensions/CommentStreams/MigrateToAbstractSchema.php extension --extension=commentstreams

Availability of SRE during upgrade
@Agent_Isai will be available from 17:00 UTC to 21:00 UTC (or up to 06:00 UTC if needed)
@RhinosF1 will be available from ~21:45 UTC to 00:00 UTC
@Reception123 will be available from 17:00 UTC to 22:00 UTC
@Universal_Omega will be available from 17:00 UTC until 23:00 UTC (or up to 08:00 UTC if necessary)
@Paladox will be available during that time (indicated via IRC)

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
RhinosF1 updated the task description. (Show Details)
RhinosF1 raised the priority of this task from Low to Normal.Oct 13 2021, 16:04
RhinosF1 updated the task description. (Show Details)
RhinosF1 moved this task from Long Term to Short Term on the MediaWiki (SRE) board.
RhinosF1 updated the task description. (Show Details)
Unknown Object (User) updated the task description. (Show Details)Oct 13 2021, 23:12
Unknown Object (User) updated the task description. (Show Details)Oct 20 2021, 00:49
Unknown Object (User) updated the task description. (Show Details)Oct 20 2021, 00:57
Unknown Object (User) updated the task description. (Show Details)Oct 21 2021, 04:19
Unknown Object (User) updated the task description. (Show Details)
Unknown Object (User) updated the task description. (Show Details)

The prep patch has been created which means that the final release will be within the next day or two.

MacFan4000 raised the priority of this task from Normal to High.Nov 18 2021, 17:29

Raising priority given that we advertise that we run the latest version of MediaWiki and now 1.37 has been released.

Raising priority given that we advertise that we run the latest version of MediaWiki and now 1.37 has been released.

Deja Vu...

In light of what happened last time, I'd like us (the MediaWiki (SRE) team) to prepare a precise plan of action for the upgrade including: 1) exact commands that are ran (nothing missed), 2) responsibilities/who does what, 3) time that it will be done (announced ~2 days in advance), 4) plan B - if something goes wrong what should be done

In light of what happened last time, I'd like us (the MediaWiki (SRE) team) to prepare a precise plan of action for the upgrade including: 1) exact commands that are ran (nothing missed), 2) responsibilities/who does what, 3) time that it will be done (announced ~2 days in advance), 4) plan B - if something goes wrong what should be done

For point 1, excluding the depool of mw11 everything else should be handled by the upgrade script in puppet. I'll add the SQLs later

For what it's worth, I agree with @Reception123's comments here, but I'm unsure why this needs to be raised to High priority. This is an SRE goal, I'm sure, but have we ever done that for past upgrades? In other words, I think that should be enough.

@Universal_Omega re: "RemovePII is completely incompatible with 1.37.0, it is not possible to maintain 1.36.0 compatibility when fixed, so a 1.37 compatible patch will need to be temporarily available as a separate branch," how likely do you anticipate being able to apply a 1.37 compatible fix for RemovePII?

Unknown Object (User) added a comment.Nov 21 2021, 19:12

@Universal_Omega re: "RemovePII is completely incompatible with 1.37.0, it is not possible to maintain 1.36.0 compatibility when fixed, so a 1.37 compatible patch will need to be temporarily available as a separate branch," how likely do you anticipate being able to apply a 1.37 compatible fix for RemovePII?

Definitely can, but it can't maintain 1.36 compat so I'll figure something out.

Also all upgrades since I've been here anyways have been high priority.

I would suggest just using REL1_X branches (if we want to keep master then just cut 1.36 before breaking compat and then deploy that to the 1.36 mw repo)

@Dmehus nearly every upgrade task has been high priority.

@Dmehus nearly every upgrade task has been high priority.

Oh, really?

@Universal_Omega re: "RemovePII is completely incompatible with 1.37.0, it is not possible to maintain 1.36.0 compatibility when fixed, so a 1.37 compatible patch will need to be temporarily available as a separate branch," how likely do you anticipate being able to apply a 1.37 compatible fix for RemovePII?

Definitely can, but it can't maintain 1.36 compat so I'll figure something out.

Also all upgrades since I've been here anyways have been high priority.

Ah, okay, what would be the time lag? If it's less than a week, we could probably revert to the old way of having SRE run the remove PII maintenance script (unless we've already removed the remove PII maintenance script).

Thanks for working on this, though! :)

Also all upgrades since I've been here anyways have been high priority.

Oh okay, sounds good then. :)

Unknown Object (User) added a comment.Nov 21 2021, 22:11

I would suggest just using REL1_X branches (if we want to keep master then just cut 1.36 before breaking compat and then deploy that to the 1.36 mw repo)

That's what I ended up doing. Can switch 1.36 to REL1_36 later.

Unknown Object (User) updated the task description. (Show Details)Nov 22 2021, 22:44

I've updated the description above to include a process for how we'll do the upgrade so we're more organised this time. We should decide when we want to do it after all extensions have been teste

Unknown Object (User) updated the task description. (Show Details)Dec 2 2021, 23:42
Unknown Object (User) updated the task description. (Show Details)Dec 3 2021, 01:16

Now that we've finished testing extensions, we should decide when we should do the upgrade. @RhinosF1 @Universal_Omega what works best for you?

I'm free from 10pm most nights for about 2 hours

RhinosF1 updated the task description. (Show Details)
Reception123 updated the task description. (Show Details)
Reception123 added a subscriber: Paladox.
Reception123 added a subscriber: Agent_Isai.
Unknown Object (User) updated the task description. (Show Details)Dec 3 2021, 16:58
Unknown Object (User) added a comment.Dec 5 2021, 20:07

Just noting, but there is still quite a bit of log spam, but nothing totally serious, these are the warnings/notices that seem to log on every page load though.

Dec 05 19:41:27 test3: PHP Deprecated:  Use of userCan hook (used in MintyDocsHooks::checkPermissions) was deprecated in MediaWiki 1.37. [Called from MediaWiki\HookContainer\HookContainer::run in /srv/mediawiki/w/includes/HookContainer/HookContainer.php at line 137]
Dec 05 19:41:27 test3: PHP Deprecated:  Use of InternalParseBeforeSanitize hook (used in VariablesHooks::onInternalParseBeforeSanitize) was deprecated in MediaWiki 1.35. [Called from MediaWiki\HookContainer\HookContainer::run in /srv/mediawiki/w/includes/HookContainer/HookContainer.php at line 137]
Dec 05 19:41:27 test3: PHP Deprecated:  Use of ParserSectionCreate hook (used in HideSectionHooks::onParserSectionCreate) was deprecated in MediaWiki 1.35. [Called from MediaWiki\HookContainer\HookContainer::run in /srv/mediawiki/w/includes/HookContainer/HookContainer.php at line 137]
Dec 05 19:41:27 test3: PHP Deprecated:  Use of ParserOptions::getUser was deprecated in MediaWiki 1.36. [Called from HeaderFooter::hOutputPageParserOutput in /srv/mediawiki/w/extensions/HeaderFooter/HeaderFooter.class.php at line 12]
Dec 05 19:41:27 test3: PHP Deprecated:  Use of User::getBoolOption was deprecated in MediaWiki 1.35. [Called from ForcePreview::onBeforePageDisplay in /srv/mediawiki/w/extensions/ForcePreview/ForcePreview.php at line 35]
Dec 05 19:41:27 test3: PHP Deprecated:  Use of User::getEffectiveGroups was deprecated in MediaWiki 1.35. [Called from GroupsSidebar::efHideSidebar in /srv/mediawiki/w/extensions/GroupsSidebar/GroupsSidebar.php at line 12]
Dec 05 19:41:27 test3: PHP Notice:  Undefined index: anontalk in /srv/mediawiki/w/includes/GlobalFunctions.php on line 194
Unknown Object (User) updated the task description. (Show Details)Dec 5 2021, 20:08

Please report upstream but we don't emit logs in prod so not too bad.

Unknown Object (User) updated the task description. (Show Details)Dec 6 2021, 04:42
Unknown Object (User) updated the task description. (Show Details)
Unknown Object (User) updated the task description. (Show Details)Dec 6 2021, 04:47
Unknown Object (User) updated the task description. (Show Details)
Unknown Object (User) removed a project: Trust & Safety.Dec 7 2021, 03:40
Unknown Object (User) updated the task description. (Show Details)Dec 7 2021, 05:47
Unknown Object (User) updated the task description. (Show Details)Dec 7 2021, 07:54
Unknown Object (User) added a comment.Dec 7 2021, 15:48
This comment was removed by Unknown Object (User).
Unknown Object (User) updated the task description. (Show Details)Dec 7 2021, 16:02
Unknown Object (User) updated the task description. (Show Details)Dec 7 2021, 16:13
Unknown Object (User) updated the task description. (Show Details)Dec 7 2021, 18:10
Unknown Object (User) updated the task description. (Show Details)Dec 7 2021, 19:40
Unknown Object (User) updated the task description. (Show Details)Dec 7 2021, 20:49
Unknown Object (User) updated the task description. (Show Details)Dec 7 2021, 21:01
Unknown Object (User) closed this task as Resolved.Dec 7 2021, 21:16
Unknown Object (User) claimed this task.

This is now done. Only a few cleanup SQL queries and maintenance scripts remain. Overall, this went fairly smoothly with not to many issues.