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

Improve progress information during long upgrades

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Development in progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.6
    • Fix Version/s: None
    • Component/s: Administration
    • Testing Instructions:
      Hide
      1. Leave the new setting disabled (Site admin > Server > Update notifications > Output version numbers during upgrades).
      2. Run a site upgrade (manually editing the database to change the version number for either core or a plugin would be the easiest way to do this)
        • Check that there is no additional output
      3. Enable the new setting.
      4. Run another site upgrade
        • Check the version number(s) of the savepoints are output, along with the date/time.
      5. Run an upgrade via the command-line (/admin/cli/upgrade.php)
        • Check the version number(s) of the savepoints are output, along with the date/time.
      6. Run via the command-line with the '--quiet' option added
        • Check that the version numbers are not output
      7. Repeat the command-line tests with the 'Output version numbers during upgrades' option disabled
        • Check the numbers are still output, unless '--quiet' is specified.
      Show
      Leave the new setting disabled (Site admin > Server > Update notifications > Output version numbers during upgrades). Run a site upgrade (manually editing the database to change the version number for either core or a plugin would be the easiest way to do this) Check that there is no additional output Enable the new setting. Run another site upgrade Check the version number(s) of the savepoints are output, along with the date/time. Run an upgrade via the command-line (/admin/cli/upgrade.php) Check the version number(s) of the savepoints are output, along with the date/time. Run via the command-line with the '--quiet' option added Check that the version numbers are not output Repeat the command-line tests with the 'Output version numbers during upgrades' option disabled Check the numbers are still output, unless '--quiet' is specified.
    • Affected Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-41047_upgrade_output

      Description

      When running slow upgrades (major version changes on large sites), it would be helpful to be able to see where the upgrade is up to (in more detail than just knowing we are in 'Core').

      I have found it very helpful to modify the upgrade_XX_savepoint functions to output the version number, module name and human-formatted time as they are called.

      I'm proposing creating a patch with a new global setting '$CFG->upgradeoutputversions' to control this output (default: off), along with a new setting on the command-line upgrade to enable it (maybe default on for command line upgrades?).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              davosmith Davo Smith
              Reporter:
              davosmith Davo Smith
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: