The docs for hook_update_N() and update_do_one() explain that you should throw DrupalUpdateException when an update fails, to prevent the schema version from being changed.
Trying to test this out with drush, I thought I was going crazy, until I realized that it just wasn't printing anything.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drush-1380948-2.patch | 2.04 KB | tim.plunkett |
Comments
Comment #1
moshe weitzman commentedWould love some help figuring out what drush should do here. Don't think the maintainers are going to give this much attention before a patch arises.
Comment #2
tim.plunkettSo it turns out that exceptions are already being caught, and there is no need to catch a more specific one.
However, they're not printing out.
Reading through #1434376: Errors not propagated, make silently "succeeds" but doesn't do anything and similar, I think it's just a matter of setting $integrate to TRUE. And I also cleaned up the message to not claim that it is performing an update that it knows just failed.
Comment #3
tizzo commentedThis patch is causing craziness to be printed at the end of each batch section in the operation if $context['message'] is used.
Example:
[…sixteen blank line returns…]
The `log"}` through DRUSH_BACKED:{` sections should not be printed (especially with the big hunk of whitespace).
Comment #4
steven jones commented@tizzo we've seen similar DRUSH_BACKEND issues, and have raised an issue with some thoughts here: #1829418: Drush invoke process can't handle large packets of data
Comment #5
moshe weitzman commentedDon't know what to do with this report. Assigning to Greg. He might choose to close it.
Comment #6
greg.1.anderson commentedLikely related to #1982502: Reduce complexity of backend invoke; consider removing concurrency.
Comment #7
moshe weitzman commentedWe fixed #1982502: Reduce complexity of backend invoke; consider removing concurrency which would explain some "craziness" that tizzo was seeing. We should probably evaluate this patch again.
Comment #8
moshe weitzman commentedIf noone updates this issue with more current info, I'll close it.
Comment #9
greg.1.anderson commentedI think that #3 was fixed in other issues, but #2 still needs review. Anyone have any good test data to try this with? Unassigning.
Comment #10
moshe weitzman commented#2 looks promising.We need some steps to reproduce in order to verify the fix.
Comment #11
greg.1.anderson commentedThis issue was marked
closed (won't fix)because Drush has moved to Github.If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to
closed (duplicate).Please ask support questions on Drupal Answers.