Stable release v2.3.6 upgrade bumpiness due to plugin

Hello,

Situation

I upgraded today to v2.3.6, the stable release from 3 days ago. I used the admin interface, successfully upgraded the docker, then ended up with an “infinite” upgrade… Checking back on the admin page, it would announce v2.3.5, but listing the upgrades would mention “still upgrading”. After reloading, I had “up to date” for all, but the v2.3.5 still showed on the admin page.

Workaround?

At this point I decided to run ./launcher rebuild standalone, and the bootstrap failed with a migration error:

ArgumentError: Unknown migration version "6.0"; expected one of "4.2", "5.0", "5.1", "5.2"

I could restart the container with ./launcher start standalone, and it showed everything is fine, and up to date to v2.3.6.

I suppose this has to do with the upgrade to Rails 6.

Did anyone else encounter issues upgrading from v2.3.5 to v2.3.6?

4 Likes

Maybe a plugin? I don’t see any migrations with ActiveRecord::Migration[6.0] in the stable branch of core.

6 Likes

Good call @gerhard! I found the culprit: discourse-policy has 6.0 migrations.

So I understand that the stable branch remains on Rails 5.2…

root@talk:/var/www/discourse/plugins# grep -r 'ActiveRecord::Migration\[6.0\]' .
./discourse-policy/db/migrate/20191013212445_migrate_policy_users_table.rb:class MigratePolicyUsersTable < ActiveRecord::Migration[6.0]
./discourse-policy/db/post_migrate/20191014224419_migrate_custom_field_to_policy_users.rb:class MigrateCustomFieldToPolicyUsers < ActiveRecord::Migration[6.0]

Is there anything I need to do to run those migrations now, or are they taken into account somehow?
I guess 2.3.7 will fix this…

4 Likes

I fixed the migrations in https://github.com/discourse/discourse-policy/commit/94635bf21761eefa4bbe0f33e18e9b9af6a9dcd4. I hope there was nothing else in the last couple of commits that breaks on the stable branch.

2 Likes

Thank you @gerhard. Should I run ./launcher rebuild again?

Yes, please try to rebuild.

2 Likes

Rebuild works fine! Thank you again @gerhard.

1 Like