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

plugin incompatible check is backwards in upgradelib

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-72324-incompatible-check
    • Hide

      Prerequisites: Clone the same version tester used in MDL-59562

      git clone git@github.com:Peterburnett/mdl-59562-tester.git admin/tool/versiontester
      

      1) Start an upgrade from the web, and confirm on the 'Plugins check' step that you see the error 'Incompatible Moodle version: 401'

      2) Run a CLI upgrade:

      php admin/cli/upgrade.php

      3) Verify that you see a message about failed dependency check:

      Dependencies check failed for tool_versiontester
      You must solve all the plugin requirements before proceeding to install this Moodle version!

      4) Edit admin/tool/versiontester/version.php and change the incompatible declaration to `$plugin->incompatible = 410;`

      5) Run a CLI upgrade again:

       php admin/cli/upgrade.php

      6) Verify that the upgrade continues and prompts for confirmation.

       

      Show
      Prerequisites: Clone the same version tester used in MDL-59562 git clone git @github .com:Peterburnett/mdl- 59562 -tester.git admin/tool/versiontester 1) Start an upgrade from the web, and confirm on the 'Plugins check' step that you see the error 'Incompatible Moodle version: 401' 2) Run a CLI upgrade: php admin/cli/upgrade.php 3) Verify that you see a message about failed dependency check: Dependencies check failed for tool_versiontester You must solve all the plugin requirements before proceeding to install this Moodle version! 4) Edit admin/tool/versiontester/version.php and change the incompatible declaration to `$plugin->incompatible = 410;` 5) Run a CLI upgrade again: php admin/cli/upgrade.php 6) Verify that the upgrade continues and prompts for confirmation.  

      https://github.com/moodle/moodle/blob/master/lib/upgradelib.php#L628

      The check here is backwards, and is opposite to both the docs and the UI check here:

      https://github.com/moodle/moodle/blob/master/lib/classes/plugininfo/base.php#L378

      Upgradelib just needs a flip from <= to >=

       

      This snuck through in MDL-59562 as the testing instruction for this was checking the equals condition, which passes for both >= and <=

        1. MDL-72324_master_1.png
          MDL-72324_master_1.png
          96 kB
        2. MDL-72324_master_2.png
          MDL-72324_master_2.png
          96 kB
        3. MDL-72324_v311_1.png
          MDL-72324_v311_1.png
          100 kB
        4. MDL-72324_v311_2.png
          MDL-72324_v311_2.png
          88 kB
        5. MDL-72324_v400_1.png
          MDL-72324_v400_1.png
          97 kB
        6. MDL-72324_v400_2.png
          MDL-72324_v400_2.png
          83 kB

            peterburnett Peter Burnett
            peterburnett Peter Burnett
            Brendan Heywood Brendan Heywood
            Jun Pataleta Jun Pataleta
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.