Skip to content

Commit

Permalink
Only pending or running workflows are considered not-final (#3940) (#…
Browse files Browse the repository at this point in the history
…3957)

* only pending or running workflows are considered not-final

* rephrase comment
  • Loading branch information
jingzhang36 authored Jun 11, 2020
1 parent 19ff1b2 commit b021b7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/src/common/util/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ func (w *Workflow) FindObjectStoreArtifactKeyOrEmpty(nodeID string, artifactName

// IsInFinalState whether the workflow is in a final state.
func (w *Workflow) IsInFinalState() bool {
if w.Status.Phase == workflowapi.NodeSucceeded || w.Status.Phase == workflowapi.NodeFailed {
// Workflows in the statuses other than pending or running are considered final.
if w.Status.Phase == workflowapi.NodeSucceeded || w.Status.Phase == workflowapi.NodeFailed || w.Status.Phase == workflowapi.NodeError || w.Status.Phase == workflowapi.NodeSkipped {
return true
}
return false
Expand Down

0 comments on commit b021b7c

Please sign in to comment.