Follow-up to #2562847: [meta] Messaging

Right now, on installation you get the message "The Drupal Upgrade UI module has been enabled. Proceed to the upgrade form." Because the UI module is intended for a one-time scenario, it is suggested that this message be treated like the maintenance mode message, displayed on every page. Related to this, should the site be put into maintenance mode when performing an upgrade?

Comments

mikeryan created an issue. See original summary.

mikeryan’s picture

Issue tags: +Barcelona2015, +Novice

Tagging for Barcelona sprinting.

quietone’s picture

+1 for having a migrate message displayed on every page.

What can break when running a migration without maintenance mode enabled?

What are the risks of having Migrate Upgrade enabled on a production site?

quietone’s picture

Status: Active » Needs review
StatusFileSize
new7.16 KB
new5.05 KB
new4.01 KB

A first go at this. Maintenance mode is enabled when migrate upgrade is installed. And a message is displayed on every page when it is installed.

Here is what it looks like with maintenance mode on and then with it off.
on
on

mikeryan’s picture

Issue tags: -Barcelona2015

What can break when running a migration without maintenance mode enabled?

The issue would be someone making changes to the site while the migration is running. Let's say, oh, changing the root password during the process...

What are the risks of having Migrate Upgrade enabled on a production site?

If the site is live in production, the rapid changes in site configuration and addition of content may be disconcerting to visitors clicking around.

  1. +++ b/migrate_upgrade.install
    @@ -13,4 +13,6 @@ use Drupal\Core\Url;
    
       drupal_set_message(t("The Drupal Upgrade module has been enabled. Proceed to the <a href='@url'>upgrade form</a>.", ['@url' => $url]));
    

    I'm not too keen on throwing the site into maintenance mode automatically on install - if we were to do it automatically at all, I would say it would best be done when executing the upgrade process. That being said...

    If we're going to set maintenance mode at install time, this message should be removed. Right now I get both

    The Drupal Upgrade module has been enabled. Proceed to the upgrade form.

    and

    The Drupal Upgrade module is enabled. View upgrade.

  2. +++ b/src/EventSubscriber/MaintenanceModeSubscriber.php
    @@ -0,0 +1,94 @@
    +      $this->drupalSetMessage($this->t("The Drupal Upgrade module is enabled. <a href='@url'>View upgrade</a>.", ['@url' => $url]), 'status', FALSE);
    

    I'm not fond of "View upgrade" for the link. What about something like "Start the upgrade process" or "Proceed to the upgrade form"?

Otherwise, looks good. I'd like to get some UX feedback from, say, bojhan and/or yoroy on when/whether to automatically apply maintenance mode though.

quietone’s picture

I too wasn't thrilled about going to maintenance mode on install but wasn't sure where it should go in the flow.

Yes, feedback from UX folks is needed.

yoroy’s picture

Thinking about a comparable scenario, these upgrades are somewhat like e.g. upgrading my OS X from Yosemite to El Capitan right? That's a very controlled flow, where you start the process, the system restarts, runs the upgrade in a locked down environment, where you can't touch anything else. Installing an updated Keynote or a security fix for the operating system can usually happen in the background. You can do other things while those updates are being installed.

So if I'm updating core 7.x to 7.x+1, or install a security update for contrib module A and B, I go to update.php and there's the recommendation to backup and to put the site in maintenance mode.

If that analogy is somewhat correct, the upgrade we're doing here is like the major OS version upgrade. From that perspective, it would make sense to automatically go into maintenance mode for this. The right moment would indeed be as mikeryan points out, when the actual process is started by the user.

---

"Start the upgrade" is much better (task driven) than both "View upgrade" (passive) and "Proceed to the upgrade form" (stuffy).

mikeryan’s picture

@quietone: Discussed a bit more with yoroy on IRC - the OS upgrade (or past Drupal upgrade) scenario isn't *completely* apt because this isn't happening on the live site directly, it's an import into a new (and presumably not-yet production) site, so locking down isn't quite as essential. But still, we agree that setting maintenance mode during the actual upgrade operation makes sense. Let's also exit maintenance mode upon successful completion (yoroy: "entering automatically means also exiting automatically I think").

quietone’s picture

@yoroy, thanks. That is so much clearer now.

Yes, the analogy isn't quite right. Thus using 'Start the upgrade' doesn't fit. 'Proceed to the upgrade form' is accurate but 'feels' wrong to me, but then so does 'View upgrade'. But I'll go with accurate any day. So I'll put 'process' back in, unless someone has a better suggestion?

quietone’s picture

Issue summary: View changes
StatusFileSize
new18.73 KB
new5.43 KB

OK. The two messages in question are now the same with the 'proceed' wording. I've made an attempt at entering and exiting maintenance mode but it is quite right. Maintenance mode is turned off in the batch finish process, but this is too late and the 'Operating in maintenance mode' message still appears. Here's a screenshot of that.Maintenance is really off

What is a better way to turn maintenance mode off?

quietone’s picture

Issue summary: View changes

Remove accidentally embedded image.

mikeryan’s picture

Status: Needs review » Closed (duplicate)
Related issues: +#2678638: [META] Usability refinements for Migrate UI

Any further UX refinement should go under #2678638: [META] Usability refinements for Migrate UI.