Skip to content

Commit 1837be1

Browse files
authored
Merge pull request #342 from werf/fix-jobs-not-failing-on-errors
fix: Jobs not failing on errors
2 parents b4b4fe4 + 823b8ac commit 1837be1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/trackers/dyntracker/statestore/readiness_task_state.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,6 @@ func initReadinessTaskStateFailureConditions(failMode multitrack.FailMode, total
212212
})
213213

214214
if failMode != multitrack.IgnoreAndContinueDeployProcess {
215-
maxErrors := lo.Max([]int{totalAllowFailuresCount + 1})
216-
217215
failureConditions = append(failureConditions, func(taskState *ReadinessTaskState) bool {
218216
var totalErrsCount int
219217
lo.Must0(domigraph.BFS(taskState.resourceStatesTree, util.ResourceID(taskState.name, taskState.namespace, taskState.groupVersionKind), func(id string) bool {
@@ -231,7 +229,7 @@ func initReadinessTaskStateFailureConditions(failMode multitrack.FailMode, total
231229
return false
232230
}))
233231

234-
return totalErrsCount > maxErrors
232+
return totalErrsCount > totalAllowFailuresCount
235233
})
236234
}
237235

0 commit comments

Comments
 (0)