Resolve "Maintenance mode: Add the possibility of unlocking the migration"
Merged
requested to merge 90-maintenance-mode-add-the-possibility-of-unlocking-the-migration into dev
Closes #90 (closed)
current implementation (to discuss) :
when migration is locked and admin clicks on checkbox to disable maintenance mode, he is asked if he wants to re-enable migration
- if response is no, maintenance mode is removed but migration remains locked (if server restarts, maintenance mode will come back)
- if response is yes, migration is unlocked, and a new attempt is made to migrate to latest database version. after migrating, a check is performed to verify if migration failed again (and re-enable maintenance mode if needed).
other possible implementations :
- have separate buttons to unlock/re-run migration.
- don't re-run migration and/or don't check migration status after unlocking (in this case, migration and checks will run again only when server is restarted).
How to verify:
- run app in dev mode and lauch 'meteor mongo' in a separate terminal
- db.migrations.update({},{$set:{locked:true}})
- restart app (or use .reload command in 'meteor shell')
- in laboite app, go to administration -> Réglages administrateurs
- uncheck 'Mettre le site en maintenance'
Edited by Bruno Boiget
Merge request reports
Activity
changed milestone to %V4.2
added In progress label
assigned to @bruno.boiget
added 1 commit
- 3a2e16f2 - feat(admin): db migration can be unlocked from appsettings UI
added 1 commit
- 22c42d11 - feat(admin): db migration can be unlocked from appsettings UI
added To review EOLE discussion labels and removed In progress label
In dev mode, I get the following logs
- if database is already up to date :
I20220407-16:44:44.831(2) (migrations_server.js:80) Migrations: Not migrating, already at version 23
- if migration steps are executed :
I20220407-16:45:39.729(2) (migrations_server.js:80) Migrations: Migrating from version 22 -> 23 I20220407-16:45:39.731(2) (migrations_server.js:80) Migrations: Running up() on version 23 (add authToken to users) I20220407-16:45:40.833(2) (migrations_server.js:80) Migrations: Finished migrating.
mentioned in commit 7f8828b4
This MR is included in version 4.2.0-testing.1The release is available on GitLab release Your semantic-release bot :package::rocket:
This MR is included in version 4.2.0The release is available on GitLab release Your semantic-release bot :package::rocket:
Please register or sign in to reply