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

fix: Differentiate between Fulfilled and Completed #3083

Merged
merged 8 commits into from May 27, 2020

Conversation

simster7
Copy link
Member

Fixes: #3081

@simster7 simster7 linked an issue May 22, 2020 that may be closed by this pull request
4 tasks
Copy link
Contributor

@alexec alexec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests!

@simster7
Copy link
Member Author

tests!

Was already working on them when you made your review 🙂

@alexec
Copy link
Contributor

alexec commented May 22, 2020

The semantics of "Complete()" are wrong - how can something that was never started ever be completed? I think Completed() should exclude skipped nodes.

Example:

Alex: "I have completed the washing up"
GF: "Alex - I can see that the sink is full of dishes - how can you claim you did the washing up?"
Alex: "Obviously, by 'complete' I meant that I skipped the washing up today"
GF: "Stop being silly - please complete the washing up"

How about:

rename Completed() to CompletedOrSkipped()
rename Executed() to Completed()

@simster7
Copy link
Member Author

The semantics of "Complete()" are wrong - how can something that was never started ever be completed? I think Completed() should exclude skipped nodes.

Completely agreed. I had the same thought but wanted to avoid changing the name if necessary.

How about:

  • Change Completed() to Fulfilled(). I.e., this node's purpose has been fulfilled, we don't have to consider it again.

  • Change Executed() to Completed()

@simster7 simster7 requested a review from alexec May 26, 2020 14:40
@simster7 simster7 changed the title fix: Differentiate between Executed and Completed fix: Differentiate between Fulfilled and Completed May 26, 2020
@sonarcloud
Copy link

sonarcloud bot commented May 26, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

78.6% 78.6% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@alexec alexec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional approval - can you please double-check the two changes?

@@ -89,7 +89,7 @@ func countPendingRunningCompleted(wf *wfv1.Workflow) (int, int, int) {
if tmpl == nil || !tmpl.IsPodType() {
continue
}
if node.Completed() {
if node.Fulfilled() {
completed++
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename variable?

workflow/controller/dag.go Show resolved Hide resolved
workflow/controller/steps.go Show resolved Hide resolved
@simster7 simster7 merged commit 132b947 into argoproj:master May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

running onExit handler in dag task even if condition isn't match
3 participants