Container Games: When LATEST is not the greatest, and how it broke my MediaWiki

Infrastructure as code they say, so I built myself a wonderful Ansible script to update my virtual machines and container installations on a regular basis without manual intervention. This has worked superbly in the past two years or so, but this week I was bitten. When I searched something in my (containerized) MediaWiki instance today, nothing could be found, and when clicking on any page in the ‘recent changes’ section, I only got a red ‘no text for this page’ error. I have to admit that this gave me goose bumps for a moment because a lot of effort went into this Wiki. So I soldiered on to investigate…

I have backups of course, so I was not really worried. After saving the current broken installation, I did a rollback to an older version of my Wiki of which I knew that it was working. Rollback is simple: Just create a directory, un-tar the backup there and do a ‘docker-compose up -d‘. Done! To my surprise, I got the same error messages again. Again, that goose bump moment when your backup doesn’t work…

O.k. so it’s definitely not the installation, it must be something else. So I downgraded to an older Docker image version of mariadb to see if that would fix the issue. It didn’t. Then I had a closer look at DockerHub and noticed that MediaWiki published the first dot release of the version 1.41 stream a day ago. A coincidence? Probably not. So I modified my docker-compose.yml file and went back from LATEST to version 1.39, which is the Long Term Support (LTS) version of MediaWiki. And indeed, everything started working again. I then changed the version to the 1.40 stream and things were still working. Going to 1.41 or LATEST broke the installation again. Ah well!

I could have stopped at this point and happily lived for another two years on the 1.39 LTS version of WikiMedia, as it’s supported until November 2025. But while I’m at it, I had a look why I couldn’t move to the latest version. Turns out that 1.41 requires database changes that are NOT happening automatically. Here’s the description of the process, which takes around 1 minute. Which makes me wonder why the installation just brakes and doesn’t inform the user? Other projects automatically start a database scheme upgrade when a version upgrade is detected or at least give a stern warning. Not so MediaWiki. A bit disappointing…

But anyway, this is a good example why LATEST as version number in Docker might not work for you in all cases. Be warned 🙂