Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-68570

Have a common pattern / api for outageless upgrades / deploys

    XMLWordPrintable

Details

    Description

      We are increasingly working towards outageless deploys where we can. There are lots of classes of changes like minor bug fixes which don't change the schema and don't need a cache purge, but should have a version bump and a new version in the plugin repo. So I'd like to have some common pattern or api so that plugins can declare that a version bump doesn't need an outage.

      I can see two broad paths:

      1) introduce some extra metadata into version.php, something along the lines of this comment from vf  in MDLSITE-4781

      Note that here we have developped several additions to the version file, to track many delivery and packaging side issues :

      For continuous delivery, we use a $version->codeincrement additional tag that let our integration partners to track small code changes, having not necessarily to update the component (no DB, event, ws or neither other version tracked info change)

      I usually track it as $version->codeincrement = "M.N.XXXX" (e.g : 3.4.0001)

      Change of it does not trigger anything in moodle upgrade, but we can track where the code change was propagated to in production environments.

       

      OR

       

      2) we introduce a new optional function in upgrade.php which receives a new version the same as the upgrade something like this:

      function xmldb_auth_saml2_upgrade_metadata($oldversion) {

      This function then can return some flags which say whether an outage is needed, and possibly other more fine grained things like whether a cache purge is needed, or maybe whether just it's own cache defs need to be purged.

      Core would run this function for all touched plugins, union all the results, and then disable some parts of the upgrade machinery as needed. Possibly this means that if there are some plugins which have been upgraded but don't need outages etc then they are simply run immediately on the spot.

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              brendanheywood Brendan Heywood
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: