-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(controller): Add memoization tests. See #3214 #3455
Conversation
@@ -592,6 +592,16 @@ func (s *ArgoServerSuite) TestWorkflowService() { | |||
Equal("Stopped with strategy 'Terminate'") | |||
}) | |||
|
|||
s.Run("Resubmit", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just a smoke test - was missing
my-wf-lzarl: | ||
phase: Failed | ||
`) | ||
wf, err := util.FormulateResubmitWorkflow(wf, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really tough to test, the memozied workflow produced is al
workflow/controller/operator.go
Outdated
@@ -1872,7 +1872,7 @@ func (woc *wfOperationCtx) executeContainer(nodeName string, templateScope strin | |||
node := woc.wf.GetNodeByName(nodeName) | |||
if node == nil { | |||
node = woc.initializeExecutableNode(nodeName, wfv1.NodeTypePod, templateScope, tmpl, orgTmpl, opts.boundaryID, wfv1.NodePending) | |||
} else if !isResubmitAllowed(tmpl) && !node.Pending() { | |||
} else if !node.StartedAt.IsZero() && (!isResubmitAllowed(tmpl) && !node.Pending()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed by @sarabala1979 in #3141
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sarabala1979 you changed this condition from:
!isResubmitAllowed(tmpl) || !node.Pending()
to
!isResubmitAllowed(tmpl) && !node.Pending()
and this has fixed the same memoization bug I was trying to fix - was that your intention?
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.See #3214