Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-11156

Drush bypasses setPreUpgradeMessage

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.4
    • Fix Version/s: 4.2.5
    • Component/s: None
    • Labels:
      None

      Description

      In the discussions around CRM-11120 [URL-1], one of the issues that has come up is a discrepancy between the web-based upgrade and the drush-based upgrade: in the web-based workflow, we display a number of informative messages before the upgrade (aka 'preUpgradeMessage'). In the drush-based upgrade, there's no moment to stop and display such messages, so drush (in the current code) doesn't try to display them.

      This becomes a functional issue with, eg, r42198 – wherein CRM_Upgrade_Incremental_php_FourTwo::setPreUpgradeMessage() does a sanity check and causes a fatal error if it fails. (This arguably violates but the contract for setPreUpgradeMessage, but it's understandable and kept that patch simple.) The web upgrade calls setPreUpgradeMessage and runs the sanity check – the drush upgrade doesn't.

      The simplest patch is to update drush's CRM_Upgrade_Headless to call setPreUpgradeMessage but the actual messages – it ensures that drush upgraders can run the sanity check and error-out. This is what we'll probably do for the next 4.2.x point release.

      However, it doesn't address the deeper design problem that the upgrade messages are basically ignored. I'm creating this ticket to solicit feedback/plans/contributions on how to deal with this better.

      [URL-1] http://issues.civicrm.org/jira/browse/CRM-11120
      [URL-2] https://fisheye2.atlassian.com/changelog/CiviCRM?cs=42198

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                timotten Tim Otten
                Reporter:
                timotten Tim Otten
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: