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 authored Dec 15, 2020
1 parent a1f7aed commit 300db5e
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 @@ -916,7 +916,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 300db5e

Please sign in to comment.