Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Rework migration system to have independent migrations #768
This follows discussions during meetings about #585 which ships a critical migration (half of yunohost won't be able to ran as long as this migration ain't ran).
The current migration system is too constraining as if a migration C or D fails (or has to be ran manually), then critical migration E won't be ran even though it's independent of C and D.
So in the case of group permissions, the migration would / could not be ran just because some other pending / failed migration.
The proposed solution is to rework the migration system to make migrations independent from each other (though we can still have dependencies between migration via
So if migrations C, D, and E are pending, running
This requires to change the way we store the state of migrations, as only the name/number of the last ran migrations was stored so far. Now instead, a yaml json containing the list of known migrations with a status
In this PR, I also included many tweaks following past experiences with the migration mechanism, such as :
Tested on my side but should run more tests ...
Also this is blocking for 3.7 since it's a must have to be sure upgrades will happen smoothly even for people upgrading from old versions
How to test
... though there are many other options and use case to test, not sure I can list them all here é_è
zamentur left a comment •
Reviewed and tested, LGTM