Skip to content

Commit

Permalink
fix: Jobs not failing on errors
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
  • Loading branch information
ilya-lesikov committed Mar 21, 2024
1 parent b4b4fe4 commit 823b8ac
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 823b8ac

Please sign in to comment.