Method OutcomeFor
OutcomeFor(JobTransition, int)
The outcome a transition records, or null when it ends nothing worth explaining.
public static JobAttemptOutcome? OutcomeFor(JobTransition transition, int priorFailures)
Parameters
transitionJobTransitionThe transition being applied.
priorFailuresintThe job's failure count before it is applied.
Returns
Remarks
Three transitions end an attempt without success: a recorded failure (retrying), a dead-letter that consumed the last retry, and a fenced release back to the queue on graceful shutdown. The release is an interruption rather than a failure — it consumes no retry budget (§11.8) — and recording it is what makes a rolling deploy legible in the timeline instead of looking like silence.
Success and cancellation record nothing: the job row already describes both. Nor does a poison-pill dead-letter, which is why the prior count matters — it dies without executing, so there is no attempt to describe, and it is told apart from a real failure by leaving the failure count untouched.