In Drush 5.1 I am noticing that when drush updb is run it does not return the update hook query information. This was handled correctly in previous versions of Drush but this information is now missing.

CommentFileSizeAuthor
#5 drush5_updb_debug.txt8.54 KBJStarcher

Comments

moshe weitzman’s picture

Priority: Normal » Major

What version of Drupal are you using?

JStarcher’s picture

$ drush --version
drush version 5.1

moshe weitzman’s picture

Thanks. I'm actually interested in Drupal version. Also, please post a --debug log. What are the ramifications of not passing back this info. Is it just a less detailed log output or is there an error?

JStarcher’s picture

Oops, sorry Moshe I read your response too quickly- I blame Monday :( I am using Pressflow 6.xx

We really need the output of the command as our WebOps department needs to know what is being run and if it ran successfully. The query info is not quite as big of a deal as the success status, but both would be ideal. In an environment with several developers when reviewing logs it can make spotting or debugging issues easier as well. If the the update command produces false positives then we could have several hours of QA testing, debugging, development, and QA retesting waisted. In the enterprise environment this small issue can be greatly magnified and become quite time consuming and costly.

Example update hook:

/**
* Test drush updb
*/
function updates_update_6050() {
$ret = array();
$ret[] = array(
'success' => FALSE,
'query' => 'Example of an update hook that failed.',
);
return $ret;
}

Drush 5 Output:
$ drush updb
The following updates are pending:

updates module
6050 - Test drush updb

Do you wish to run all pending updates? (y/n): y
'all' cache was cleared in /home/jstarcher/devel/publish#localhost.mysite.com [success]
Finished performing updates. [ok]

Drush 4 Output:
$ drush4 updb
The following updates are pending:

updates module
6050 - Test drush updb

Do you wish to run all pending updates? (y/n): y
Executing updates_update_6050 [success]
Example of an update hook that failed. [error]

'all' cache was cleared [success]
Finished performing updates. [ok]

JStarcher’s picture

StatusFileSize
new8.54 KB

Attached is debug info.

djdevin’s picture

I can confirm this as well, using plain Drupal 6.

moshe weitzman’s picture

Status: Active » Closed (duplicate)