Skip to content

Commit

Permalink
[core] remove obsolete workaround to make ERROR state always win
Browse files Browse the repository at this point in the history
As far as I understand, this was an attempt at fixing the cases when ERROR state is overriden by MIXED, which was fixed in #535 and #536 directly in the state arithmetics code.
I don't think this is needed anymore and happy tests seem to confirm it.
  • Loading branch information
knopers8 authored and teo committed Mar 28, 2024
1 parent c042a52 commit 1dd0b01
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions core/workflow/safestate.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ func aggregateState(roles []Role) (state task.State) {
if len(roles) == 0 {
return
}
var hasBeenInError = false
for _, c := range roles {
taskR, isTaskRole := c.(*taskRole)
callR, isCallRole := c.(*callRole)
Expand All @@ -52,14 +51,8 @@ func aggregateState(roles []Role) (state task.State) {
continue
}
}
if c.GetState() == task.ERROR {
hasBeenInError = true
}
state = state.X(c.GetState())
}
if hasBeenInError && state == task.MIXED {
state = task.ERROR
}
return
}

Expand Down

0 comments on commit 1dd0b01

Please sign in to comment.