Skip to content
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

Merged
merged 4 commits into from
Jul 13, 2020

Conversation

alexec
Copy link
Contributor

@alexec alexec commented Jul 11, 2020

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I've signed the CLA.
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My builds are green. Try syncing with master if they are not.
  • My organization is added to USERS.md.

See #3214

@@ -592,6 +592,16 @@ func (s *ArgoServerSuite) TestWorkflowService() {
Equal("Stopped with strategy 'Terminate'")
})

s.Run("Resubmit", func() {
Copy link
Contributor Author

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)
Copy link
Contributor Author

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

@alexec alexec marked this pull request as ready for review July 13, 2020 14:39
@@ -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()) {
Copy link
Contributor Author

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

Copy link
Contributor Author

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?

@alexec alexec marked this pull request as draft July 13, 2020 14:56
@alexec alexec requested a review from sarabala1979 July 13, 2020 14:56
@alexec alexec linked an issue Jul 13, 2020 that may be closed by this pull request
@alexec alexec changed the title fix(controller): Fix memoization. Fixes #3241 fix(controller): Fix memoization. Fixes #3214 Jul 13, 2020
@alexec alexec changed the title fix(controller): Fix memoization. Fixes #3214 test(controller): Add memoization tests. See #3214 Jul 13, 2020
@alexec alexec marked this pull request as ready for review July 13, 2020 19:54
@alexec alexec merged commit 1e42813 into argoproj:master Jul 13, 2020
@alexec alexec deleted the fix-3214 branch July 13, 2020 20:06
alexec added a commit to alexec/argo-workflows that referenced this pull request Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants