Skip to content

Commit

Permalink
isFailure includes isCancelled
Browse files Browse the repository at this point in the history
`isFailure` includes `isCancelled`, but some functions are calling
these `isFailure` and `isCancelled` separately. This change removes
the separate calls to `isCancelled` where `isFailure` already exists.
  • Loading branch information
jerop authored and tekton-robot committed Jun 14, 2022
1 parent df98103 commit 72f20dc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (t ResolvedPipelineRunTask) isRunning() bool {
return false
}
}
return !t.isSuccessful() && !t.isFailure() && !t.isCancelled()
return !t.isSuccessful() && !t.isFailure()
}

// IsCustomTask returns true if the PipelineTask references a Custom Task.
Expand Down
3 changes: 0 additions & 3 deletions pkg/reconciler/pipelinerun/resources/pipelinerunstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,6 @@ func (state PipelineRunState) getRetryableTasks(candidateTasks sets.String) []*R
func (facts *PipelineRunFacts) IsStopping() bool {
for _, t := range facts.State {
if facts.isDAGTask(t.PipelineTask.Name) {
if t.isCancelled() {
return true
}
if t.isFailure() {
return true
}
Expand Down

0 comments on commit 72f20dc

Please sign in to comment.