Skip to content
  • Aaron Wells's avatar
    CLI upgrader, better handling of out-of-sequence plugin upgrades · 0e1704c1
    Aaron Wells authored
    Bug 1614805. When a plugin is installed "out of sequence" by a
    call to plugin_upgrade in the core lib/db/upgrade.php file, the
    AJAX-based web upgrader handles it gracefully, because it does
    check_upgrade() before upgrading each plugin, detects the change
    in status, and doesn't run the upgrade for that plugin a second
    time.
    
    The CLI upgrader, on the other hand, uses the same cached data
    from check_upgrades() all the way through, causing it to re-run
    upgrades for such plugins.
    
    This patch makes it behave the same as the AJAX plugin, running
    check_upgrade() again immediately before each component gets
    upgraded. This does cause some redundancy in code execution,
    but it shouldn't be enough to cause a noticeable performance hit.
    
    Change-Id: Id5c431fc9e636df2cab05d22e6cc424271ce9f3d
    behatnotneeded: Covered by existing tests
    0e1704c1