Jump to content

Fundraising/Cluster/Upgrades

From Wikitech

Payments

Security Update

What do we do for these

Upgrading to a new LTS version

This happens every 2 years as we move onto the new LTS mediawiki version

January 2025 we moved from 1.39 to 1.43

1. Make a new branch

Branches are here https://gerrit.wikimedia.org/r/admin/repos/mediawiki/extensions/DonationInterface,branches

Create new at the top right [is there anything else specific we need to do here]

There is a standard set of changes that need to be done to start a new branch

  1. Delete unused extensions and skins
  2. Add WMF logos https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1117986
  3. Add Payments wiki extensions
  4. Update vendor for merged fundraising dependencies

2. Test locally

3. Get CI upgraded

[ was this actually related to the bookworm upgrade and not 143? need to confirm]

4. Get tests passing on CI

5. Deploying

  1. SRE changing fundraising_code_update to look at the new branch
  2. Doing the upgrade on staging
  3. Deploying to staging

rsync_blaster payments1008:payments-wiki-staging` but it's just as easy and clean to do ALL

  1. Testing on staging
  2. Doing the upgrade on production
  3. Testing on production

Civi

other things

from mediawiki last updated june 2020

How to apply a security update

  • fetch the upstream LTS release with e.g. 'git fetch origin REL1_31'
    • If you are on vagrant, you may have to edit your .gitconfig to allow fetching other branches - just deleting the 'fetch' section seems to work
  • look at the changes with git diff origin/REL1_31 or git log -p HEAD..origin/REL1_31
  • get a clean changelog with git log --oneline --reverse --no-merges HEAD..origin/REL1_31 | cat
  • do the merge: git merge origin/REL1_31
  • resolve any conflicts. Note that the fundraising version of the LTS release has images added and has a different set of submodules, so be sure the merge does not delete images or add or delete submodules.
  • test locally!
  • review, merge to fundraising/REL1_31 and deploy.

Upgrade scenarios

Schema upgrade required

  • Confirm a recent database backup.
  • Disable campaigns.
  • Disable paymentswiki using LocalSettings variable.
  • Update the code to the new release.
  • Enable writability on the master wiki database (payments1001)
  • Login to payments1001, cd to the wiki root directory, and run "php maintenance/run.php update".
  • Reenable paymentswiki and test.
  • Reenable campaigns.
  • Watch logs for 1 hr.

Risky, but code-only changes

  • Disable campaigns.
  • Disable paymentswiki using LocalSettings variable.
  • Update the code to the new release.
  • Reenable paymentswiki and test.
  • Reenable campaigns.
  • Watch logs for 1 hr.

Safe, code-only changes

  • Update the code to the new release.
  • Watch logs for 1 hr.