PSA: Stable 3.3.3 -> 3.4.0 upgrade via GUI failed, had to rebuild via command line

AI-generated summary

Users discuss a failed GUI upgrade from Discourse stable 3.3.3 to 3.4.0. rahim123 reports the GUI upgrade failed, leaving the forum stuck on the old version despite claiming to be updated. They resolved it by running /var/discourse/launcher rebuild app twice via SSH — first to upgrade Postgres, then again to complete the rest — followed by a cleanup to remove the old database backup. Jagster notes this upgrade likely cannot be done via GUI at all. pfaffman agrees, suggesting the GUI should block such attempts and recommending command-line upgrades for Stable branch users. rahim123 concurs, noting GUI upgrades work fine for minor patch updates within a major version but not for major version bumps — a lesson learned.

Just a heads-up for self-hosted stable branch users. For me the upgrade via the GUI failed, I’m not sure if this would happen to everyone, as I saw some errors about unicorn processes, which tends to be a random issue in my experience. But at any rate that left my forum in a state where it claimed to be up-to-date in /admin/update while still being stuck on the old version.

So I had to SSH into the server and /var/discourse/launcher rebuild app two times, the first time it just upgrades Postgres:

UPGRADE OF POSTGRES COMPLETE

Old 13 database is stored at /shared/postgres_data_old

To complete the upgrade, rebuild again using:

./launcher rebuild app

And the second time it finishes the rest of the upgrades.

After that was all over and verifying that my data was intact I also did a /var/discourse/launcher cleanup to get rid of the huge backup file that it created for the old database.

AFAIK it will, and this is one of those upgrades that can’t be done using GUI.

It really shouldn’t allow people to try, but also, if you’re on Stable, I’d think it best to only do command line upgrades.

This is what I was thinking too.

The GUI seems to work well enough for X.Y.z updates within a major Stable release, but yes, lesson learned for when there is a major new version.