1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-11 01:12:41 +01:00
phorge-phorge/src/infrastructure
epriestley e9af4f8970 Fix an issue where Drydock followup tasks would not queue if the main task failed
Summary:
Ref T9994. This fixes the first issue discussed on that task, which is that when a merge fails after "arc land", we would not clean up all the leases properly.

Specifically, when a merge fails, we use `queueTask()` to schedule a followup task. This followup destroys the lease and frees the underlying resource.

However, the default behavior of `queueTask()` is to //not queue tasks// if the parent task fails. This is a reasonable, safe behavior that was originally introduced in D8774, where it kept us from sending too much mail if a task did "send some mail" and then failed a little later on and got retried.

Since I think the default behavior is correct, I just special cased the behavior for Drydock to make it queue even on failure. These are the only types of followup tasks we currently want to queue on main task failure.

(It's possible that future Blueprints might want some kind of more specialized behavior, where some tasks queue only on success, but we can cross that bridge when we come to it.)

Test Plan:
  - See T9994#149878 for test case setup.
  - I ran that test case again with this patch, and saw the followup task queue properly in the `--trace` log, a correspoinding update task show up in `/daemon/`, and the lease get destroyed when I ran it a moment later.

{F1029915}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9994

Differential Revision: https://secure.phabricator.com/D14818
2015-12-18 08:17:04 -08:00
..
customfield Make configured and EditEngine defaults work correctly for custom fields 2015-12-17 10:44:41 -08:00
daemon Fix an issue where Drydock followup tasks would not queue if the main task failed 2015-12-18 08:17:04 -08:00
diff Allow lint messages to be rendered as Remarkup 2015-11-15 19:50:10 +00:00
edges Use getPhobjectClassConstant() to access class constants 2015-10-01 16:56:21 -07:00
env Remove daemon envHash and envInfo 2015-11-11 08:54:45 +11:00
events Remove WILLEDITTASK and DIDEDITTASK events 2015-12-09 07:03:15 -08:00
internationalization Implement DestructibleInterface for Owners Packages 2015-12-10 07:04:06 -08:00
javelin Extend from Phobject 2015-06-15 18:02:27 +10:00
lint/linter Linter fixes 2015-12-03 07:44:23 +11:00
log Extend from Phobject 2015-06-15 18:02:27 +10:00
management Add some of a billing daemon skeleton 2015-01-30 11:29:05 -08:00
markup Add styling for new Remarkup highlighter 2015-11-02 13:20:07 -08:00
query Allow custom fields to be ordered ascending or descending 2015-12-16 12:59:22 -08:00
sms Various linter fixes 2015-08-11 22:36:55 +10:00
ssh phtize all the things 2015-05-22 21:16:39 +10:00
storage Add a lock to storage upgrade and adjustment 2015-12-02 06:18:28 +11:00
testing Always override auth.email-domains when running unit tests 2015-11-10 10:15:10 -08:00
time Extend from Phobject 2015-06-15 18:02:27 +10:00
util Add a lock to storage upgrade and adjustment 2015-12-02 06:18:28 +11:00
PhabricatorEditor.php Mark some strings for translation 2015-06-09 23:06:52 +10:00