The test failure in recursion.make caused by #1561654: pm-download fails for --variant=profile-only fails without displaying an error, even though the backend pm-download command (drush dl drupal_forum) does throw an error:

drush make --no-core /home/jhedstrom/work/contributions/utilities/drush/tests/makefiles/recursion.make . --contrib-destination=profiles/drupal_forum --md5
 >> Project views contains 2 modules: views, views_ui.
 >> views-7.x-3.0-rc3 downloaded.                                                                         [ok]
 >> Install location /tmp/make_tmp_1336160917_4fa4329588c00/__build__/profiles/drupal_forum already exists. Do you want to overwrite it? (y/n): y
 >> drupal_forum-7.x-1.0-alpha2 downloaded.                                                               [ok]
Build hash: d41d8cd98f00b204e9800998ecf8427e                                                              [ok]
CommentFileSizeAuthor
#4 set_error.patch790 bytesmoshe weitzman
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhedstrom’s picture

Component: PM (dl, en, up ...) » Make

Actually, I think this is a problem with the way make is parsing the return data from drush_invoke_process().

jhedstrom’s picture

Title: drush_backend_invoke_concurrent() not propagating errors » drush_invoke_process() not propagating errors
Component: Make » Base system (internal API)

Hmm, no, unless I'm missing something, both 'error_status' and 'error_log' are empty on the failed call, even though there is a log of type error in the 'log' return.

Steven Jones’s picture

Seeing this problem with Aegir too.

moshe weitzman’s picture

Title: drush_invoke_process() not propagating errors » pm-download sets a 'soft' error during failure
Assigned: Unassigned » jonhattan
Status: Active » Needs review
FileSize
790 bytes

The problem isn't error propogation per se, the problem is that pm-download is setting an error with drush_load('foo', 'error') instead of drush_set_error(). When you do that, you don't properly set exit code to 1 and backend calls think you finished successfully.

The attached patch changes pm-download to error immediately upon any download failure. I'm not sure why we decided to use this soft failure. Anyone remember? The hard error in this patch might be too big a change for drush5? I'm not sure what the repercussions are.

I'd love to hear from Jonhattan and Greg if they have ideas.

jonhattan’s picture

It looks safe to me without the return statement.

moshe weitzman’s picture

Status: Needs review » Fixed

Committed, without the return statement. See c3a3994

Status: Fixed » Closed (fixed)

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