From e8c4aa4a99a5ea06c8c0cf1807df40e99d86da85 Mon Sep 17 00:00:00 2001 From: Alex Collins Date: Tue, 15 Dec 2020 09:07:42 -0800 Subject: [PATCH] fix(controller): Requeue when the pod was deleted. Fixes #4719 (#4742) Signed-off-by: Alex Collins --- workflow/controller/operator.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/workflow/controller/operator.go b/workflow/controller/operator.go index 8cc7b4ed675b..14a4966384b4 100644 --- a/workflow/controller/operator.go +++ b/workflow/controller/operator.go @@ -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 }