Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-2534

Better handle failed migrations

    XMLWordPrintable

    Details

    • 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:
      Hide

      Following a failed migration, the application will automatically be downgraded to the previous working version and will not allow to upgrade to the problematic version anymore. It will be possible to upgrade to the next version working version when available.

      Show
      Following a failed migration, the application will automatically be downgraded to the previous working version and will not allow to upgrade to the problematic version anymore. It will be possible to upgrade to the next version working version when available.
    • Sprint:
      nxDrive 11.2.22, nxDrive 11.2.23, nxplatform #39, nxplatform #40, nxplatform #43, nxplatform #44
    • Story Points:
      1

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: