-
Type: New Feature
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.2.7
-
Component/s: Framework
-
Release Notes Summary:Better handle failed migrations
-
Release Notes Description:
-
Epic Link:
-
Tags:
-
Sprint:nxDrive 11.2.22, nxDrive 11.2.23, nxplatform #39, nxplatform #40, nxplatform #43, nxplatform #44
-
Story Points:1
Plan
Here is the experience we want to propose on migration failure:
- The app will be automatically downgraded to the previous working version.
- The app will not allow to upgrade to the problematic version anymore. But it will allow to upgrade to the next next version.
Details
- Add a new option: xxx_broken_update (starts with "xxx_" to explicitely saying this is a private option, generated automatically). That option will contain the version number when the migration failed, e.g. 4.5.1 if 4.5.1 is failing when migrating databases.
- The app will check the option in its auto-updater, and if it is defined and it points to the next available version, then it means the auto-update is not possible to that new version. A log line will be printed, and that's it.
- On migration failure, in order to alert the team, we need to find a way to send the error in a synchronous metric.
Why Will This Work?
The thing making the whole behavior working is that if one version is failing the migration, and if the team is aware of that, then the migration step could be fixed in a future version. Thus allowing the app to finally do the upgrade without blocking the user ad vitam on a given version.
Final Words
Pros:
- No more broken installations.
- No altered data on migration failure.
- Fully automatic downgrade and future upgrade management.
Cons:
- None.
- is related to
-
NXDRIVE-2544 Handle multi-account failed migrations
- Open
-
NXDRIVE-2535 Allow to pass a script in config to do custom db migrations
- Resolved
- Is referenced in