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

Block upgrade steps are unnecessarily slow

    XMLWordPrintable

Details

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-74271-master-squashed
    • Hide

      Follow upgrade steps from MDL-72092, copied below:

       

      Before the patch (to test an upgraded site)

      Setup

      1. Check out the version of moodle before MDL-72092 got integrated.

        git checkout 47e880e347ccb2c216d72f803ff6154820695bf0

      2. Install a new site based on this version.
      3. Log in as Admin on the site
      4. Navigate to the Dashboard
      5. Delete any blocks in the center of the page except one (If no blocks exist currently add one block to the center of the page)
      6. Delete recentlyaccesseditems block (if exists) from the block drawer
      7. Navigate to /my/indexsys.php
      8. Delete any and all blocks in the center of the page
      9. Log in as User 1 on the site
      10. Navigate to the dashboard
      11. Delete any and all blocks in the center of the page
      12. Add recentlyaccesseditems block (if does not exist) in the block drawer
      13. Log in as User 2 on the  site
      14. Navigate to the dashboard
      15. Delete any and all blocks in the center of the page
      16. Add recentlyaccesseditems block to the center of the page
      17. Add Calendar block to the block drawer

      NOTE: Ensure none of the remaining blocks are timeline or calendar_month for Admin, User 1 and indexsys

      The following setup should now be on the instance:
      Admin dashboard 1 block in the center
      my/indexsys.php 0 blocks in the center
      User 1 dashboard 0 blocks in the center
      User 2 dashboard 0 blocks. Calendar block in the block drawer

      Upgrade test:

      1. Check out the the version of moodle with this patch applied

        git checkout master

      2. Log in as Admin on the site
      3. Run through the upgrade
      4. Confirm there are no errors
      5. Navigate to Dashboard
      6. Confirm the Timeline & Calendar blocks are in the center of the page
      7. Confirm the Recently access items is in the block drawer
      8. Navigate to /my/indexsys.php
      9. Confirm the Timeline & Calendar blocks are in the center of the page
      10. Log in as User 1
      11. Navigate to Dashboard
      12. Confirm the Timeline & Calendar blocks are in the center of the page
      13. Confirm the Recently access items is in the block drawer
      14. Log in as User 2
      15. Repeat #11-#13
      16. Confirm the calendar block is not in the block drawer
      17. Confirm the recently accessed items is not in the center of the page
         
      Show
      Follow upgrade steps from MDL-72092 , copied below:   Before the patch (to test an upgraded site) Setup Check out the version of moodle before MDL-72092 got integrated. git checkout 47e880e347ccb2c216d72f803ff6154820695bf0 Install a new site based on this version. Log in as Admin on the site Navigate to the Dashboard Delete any blocks in the center of the page except one (If no blocks exist currently add one block to the center of the page) Delete recentlyaccesseditems block (if exists) from the block drawer Navigate to /my/indexsys.php Delete any and all blocks in the center of the page Log in as User 1 on the site Navigate to the dashboard Delete any and all blocks in the center of the page Add recentlyaccesseditems block (if does not exist) in the block drawer Log in as User 2 on the  site Navigate to the dashboard Delete any and all blocks in the center of the page Add recentlyaccesseditems block to the center of the page Add Calendar block to the block drawer NOTE: Ensure none of the remaining blocks are timeline or calendar_month for Admin, User 1 and indexsys The following setup should now be on the instance: Admin dashboard 1 block in the center my/indexsys.php 0 blocks in the center User 1 dashboard 0 blocks in the center User 2 dashboard 0 blocks. Calendar block in the block drawer Upgrade test: Check out the the version of moodle with this patch applied git checkout master Log in as Admin on the site Run through the upgrade Confirm there are no errors Navigate to Dashboard Confirm the Timeline & Calendar blocks are in the center of the page Confirm the Recently access items is in the block drawer Navigate to /my/indexsys.php Confirm the Timeline & Calendar blocks are in the center of the page Log in as User 1 Navigate to Dashboard Confirm the Timeline & Calendar blocks are in the center of the page Confirm the Recently access items is in the block drawer Log in as User 2 Repeat #11-#13 Confirm the calendar block is not in the block drawer Confirm the recently accessed items is not in the center of the page  

    Description

      4 blocks (myoverview, timeline, recentlyaccesseditems, and calendar_month) all have upgrade steps that either add or remove instances of the block to/from the dashboard page.

      But the database operations used can take quite some time. While testing an upgrade of client site, we found that each one of those block upgrade steps took around 40 minutes to complete.

      After a relatively minor rework of the upgrade steps, I was able to take it to under 1 minute per block.

      Attachments

        1. MDL-74271_1.png
          MDL-74271_1.png
          68 kB
        2. MDL-74271_2.png
          MDL-74271_2.png
          91 kB
        3. MDL-74271_3.png
          MDL-74271_3.png
          73 kB
        4. MDL-74271_4.png
          MDL-74271_4.png
          77 kB
        5. MDL-74271_5.png
          MDL-74271_5.png
          82 kB
        6. screenshot-1.png
          screenshot-1.png
          159 kB
        7. test2.php
          6 kB
        8. test3.php
          5 kB
        9. test4.php
          4 kB

        Issue Links

          Activity

            People

              dobedobedoh Andrew Lyons
              emerrill Eric Merrill
              Eric Merrill Eric Merrill
              Jun Pataleta Jun Pataleta
              Angelia Dela Cruz Angelia Dela Cruz
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 5 hours
                  2d 5h

                  Clockify

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