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

CLI upgrade does not check that Moodle actually needs upgrading

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.1.4, 2.2.1, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Administration
    • Labels:
      None
    • Environment:
      CLI
    • Testing Instructions:
      Hide

      Testing difficulty: easy, requires CLI access

      1. Via the web, visit /admin site of your server and make sure that no upgrade process is triggered (that is, normal Admin notifications page appears)
      2. At the command line, execute /admin/cli/upgrade.php
      3. TEST: Make sure no upgrade process is triggered

      Show
      Testing difficulty: easy, requires CLI access 1. Via the web, visit /admin site of your server and make sure that no upgrade process is triggered (that is, normal Admin notifications page appears) 2. At the command line, execute /admin/cli/upgrade.php 3. TEST: Make sure no upgrade process is triggered
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-31832-cli-upgrade

      Description

      Whenever you execute admin/cli/upgrade.php, a page like this appear:

      == Upgrading Moodle database from version 2.2.1+ (Build: 20120223) (2011120501.1) to 2.2.1+ (Build: 20120223) (2011120501.1) ==

      Your Moodle files have been changed, and you are about to automatically
      upgrade your server to this version:

      2.2.1+ (BUILD: 20120223) (2011120501.1)

      Once you do this you can not go back again.

      Please note that this process can take a long time.

      Are you sure you want to upgrade this server to this version?

      Note that both versions (builds) are identical and the text is actually a lie - the Moodle files have NOT changed. This is not a major problem as no upgrade step is really executed. But it's quite confusing.

        Gliffy Diagrams

          Activity

          Hide
          mudrd8mz David Mudrak added a comment -

          Submitting patch for master. Should be easily backportable to stable versions. However, it's not really crucial so did not bother with preparing other branches.

          Show
          mudrd8mz David Mudrak added a comment - Submitting patch for master. Should be easily backportable to stable versions. However, it's not really crucial so did not bother with preparing other branches.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          (getting on this)

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - (getting on this)
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          After some private discussion with David, we have agreed that returning 0 is better for keeping this BC when no upgrade is necessary.

          So, I've added one extra commit changing the 63 exit code to 0. And also backported this to 21 and 22 stables.

          So integrated, thanks! (21, 22 & master)

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - After some private discussion with David, we have agreed that returning 0 is better for keeping this BC when no upgrade is necessary. So, I've added one extra commit changing the 63 exit code to 0. And also backported this to 21 and 22 stables. So integrated, thanks! (21, 22 & master)
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Executed against all branches, expected message and error code (0) returned. So passing!

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Executed against all branches, expected message and error code (0) returned. So passing!
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Your changes are now upstream and will be included in the next minor released scheduled for March 13th (next Monday!).

          icao_reverse('arreis olik rebemevon afla letoh ognat');

          Closing, ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Your changes are now upstream and will be included in the next minor released scheduled for March 13th (next Monday!). icao_reverse('arreis olik rebemevon afla letoh ognat'); Closing, ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Mar/12