Skip to content

Commit

Permalink
Merge pull request #342 from werf/fix-jobs-not-failing-on-errors
Browse files Browse the repository at this point in the history
fix: Jobs not failing on errors
  • Loading branch information
ilya-lesikov authored Mar 21, 2024
2 parents b4b4fe4 + 823b8ac commit 1837be1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/trackers/dyntracker/statestore/readiness_task_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ func initReadinessTaskStateFailureConditions(failMode multitrack.FailMode, total
})

if failMode != multitrack.IgnoreAndContinueDeployProcess {
maxErrors := lo.Max([]int{totalAllowFailuresCount + 1})

failureConditions = append(failureConditions, func(taskState *ReadinessTaskState) bool {
var totalErrsCount int
lo.Must0(domigraph.BFS(taskState.resourceStatesTree, util.ResourceID(taskState.name, taskState.namespace, taskState.groupVersionKind), func(id string) bool {
Expand All @@ -231,7 +229,7 @@ func initReadinessTaskStateFailureConditions(failMode multitrack.FailMode, total
return false
}))

return totalErrsCount > maxErrors
return totalErrsCount > totalAllowFailuresCount
})
}

Expand Down

0 comments on commit 1837be1

Please sign in to comment.