Skip to content

Commit

Permalink
fix(controller): Requeue when the pod was deleted. Fixes #4719 (#4742)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Collins <alex_collins@intuit.com>
  • Loading branch information
alexec committed Dec 18, 2020
1 parent 11bc9c4 commit e8c4aa4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,14 @@ func (woc *wfOperationCtx) podReconciliation() error {

// If the node is pending and the pod does not exist, it could be the case that we want to try to submit it
// again instead of marking it as an error. Check if that's the case.
if node.Pending() || recentlyStarted {
if node.Pending() {
continue
}
if recentlyStarted {
// If the pod was deleted, then we it is possible that the controller never get another informer message about it.
// In this case, the workflow will only be requeued after the resync period (20m). This means
// workflow will not update for 20m. Requeuing here prevents that happening.
woc.requeue(defaultRequeueTime)
continue
}

Expand Down

0 comments on commit e8c4aa4

Please sign in to comment.