Closed Bug 2021999 Opened 8 months ago Closed 3 months ago

Abort deferred Landing and Automation jobs after maximum number of attempts reached

Categories

(Conduit :: Lando, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sheehan, Assigned: sheehan)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

When a landing job encounters repeated temporary failures (such as in the case that caused bug 1993136), it gets deferred and retried indefinitely. Since the worker processes jobs sequentially per repository, a permanently-deferring job blocks all subsequent landings for that repo. The only recovery is manual intervention, as someone has to notice the backlog and cancel the stuck job by hand.

We should implement a "poison pill" protection mechanism to mitigate this issue without human intervention. After a configurable maximum number of attempts, jobs should be automatically moved to a terminal status (FAILED/CANCELLED, or perhaps a new state which means "failed due to max retries) instead of being continuously retried. This would unblock the queue without human intervention and allow EngWF to debug the issue without blocking landings.

See Also: → 2054234
Summary: Implement "poison pill" protection in Lando job queues → Abort deferred Landing and Automation jobs after maximum number of attempts reached
See Also: → 2057368
Blocks: 2057401

I'd be in favour of a dedicated status, rather than just Cancelled. Maybe just

We should also make sure to notify the creator of the job that it was killed.

One thing to note is that we should probably have a category of deferrals that shouldn't be killed. Treestatus closure would be the first one. Perhaps we need to keep those as deferred and not terminate them, and introduced another status of, say, “Retriable” for those that could be terminated safely.

Assignee: nobody → sheehan

Authored by https://github.com/cgsheeh
https://github.com/mozilla-conduit/lando/commit/60e5c76724cd409cc30a392cf7c4eb551cac50dc
[main] workers: abort jobs which keep deferring (bug 2021999) (#1354) r=shtrom,zeid

Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Blocks: 2066570
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: