Page MenuHomePhabricator

Fix an issue where Drydock followup tasks would not queue if the main task failed
ClosedPublic

Authored by epriestley on Dec 18 2015, 3:24 PM.
Tags
None
Referenced Files
F14055312: D14818.diff
Sat, Nov 16, 10:22 AM
F14041934: D14818.diff
Mon, Nov 11, 11:05 PM
F14030048: D14818.diff
Fri, Nov 8, 11:33 PM
F14029467: D14818.diff
Fri, Nov 8, 8:44 PM
F14025840: D14818.diff
Thu, Nov 7, 8:49 PM
F14001556: D14818.id.diff
Fri, Oct 25, 9:24 AM
F13989896: D14818.id35824.diff
Mon, Oct 21, 11:45 PM
F13977471: D14818.id35825.diff
Oct 18 2024, 6:41 PM
Subscribers
None

Details

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.

destroyed.png (437×1 px, 90 KB)

Diff Detail

Repository
rP Phabricator
Branch
drydock1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 9642
Build 11545: Run Core Tests
Build 11544: arc lint + arc unit

Event Timeline

  • Remove unrelated example code.
chad edited edge metadata.
This revision is now accepted and ready to land.Dec 18 2015, 4:12 PM
This revision was automatically updated to reflect the committed changes.