I'd like to be able to run in-place updates on a site. To retain rollbacks, we can perform a site backup prior to running updates, and restore it in a rollback hook, if need be. To that end, I've written Hosting Update and Provision Update. These are sandbox projects at present, as @anarcat suggested they'd be good candidates for inclusion in core.

For a bit of background, these are the result of a discussion with @anarcat about a method of deploying changes to a site where the site directory is managed with Git, as part of Valkyrie. This task essentially provides a convenient (Drush) hook to allow a 'git pull'.

I'm working on a way to list the required updates in the confirmation form. However, this appears more complicated than everything that I've built so far for this. Basically, right now, I'm exploring implementing a 'provision-update-list' command. But, this has to be handled differently for various versions of Drupal, which would appear to best be done with an 'engine', etc.

A much simpler solution would be to patch Drush to add a '--list' option. This would allow us to use all Drush's complex logic, rather than have to re-implement it.

Comments

ergonlogic’s picture

With @helmo's encouragement, I've added this command/task to https://drupal.org/project/hosting_tasks_extra.

anarcat’s picture

i still believe this would belong in 3.x core, along with optimised migrate paths.

ergonlogic’s picture

So, there's a simple way to get this list of available updates from the command line: drush updatedb --no. While it's not structured data, it's something we can work with. I've never tried passing the '--no' switch when invoking a Drush command programmatically though...

The tougher problem seems to be that this'll need to run as the 'aegir' user on the backend, which entails queuing a task and retrieving its output before our confirmation form is displayed. The only example of something comparable, that I'm aware of, is with how hosting_remote_import gets a list of sites from the remote server via a batch callback.

ergonlogic’s picture

I really wonder to what extent listing the updates is really required. I think it'd be a nice enhancement, but we're doing it blindly now.

anarcat’s picture

Yeah, we don't need to list, let the user choose.

_vid’s picture

Would this help: drush up --pipe
Then you have a list to loop through.

ergonlogic’s picture

@_vid unfortunately, no. We're talking about pending database updates after one or more modules have already been updated. Whereas the update module shows modules with more current versions available on d.o.

ergonlogic’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Status: Needs review » Postponed

This exists in contrib. We can merge it into a later version.

helmo’s picture

Issue summary: View changes
Status: Postponed » Postponed (maintainer needs more info)

Changing status to finter it out of my regular issue list.

The more info can be read as needing a motivation to merge this as opposed to just using it from the hosting_tasks_extra module.

ergonlogic’s picture

Status: Postponed (maintainer needs more info) » Fixed

This is actually in Aegir via Hosting Tasks Extra in Golden Contrib.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.