mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-27 16:17:34 +00:00
make finish condition more clear
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
This commit is contained in:
@@ -509,8 +509,14 @@ func IsStepFinish(phase common.WorkflowStepPhase, reason string) bool {
|
||||
if feature.DefaultMutableFeatureGate.Enabled(features.EnableSuspendOnFailure) {
|
||||
return phase == common.WorkflowStepPhaseSucceeded
|
||||
}
|
||||
if phase == common.WorkflowStepPhaseFailed {
|
||||
switch phase {
|
||||
case common.WorkflowStepPhaseFailed:
|
||||
return reason == StatusReasonTerminate || reason == StatusReasonFailedAfterRetries
|
||||
case common.WorkflowStepPhaseSkipped:
|
||||
return true
|
||||
case common.WorkflowStepPhaseSucceeded:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
return phase == common.WorkflowStepPhaseSucceeded || phase == common.WorkflowStepPhaseSkipped
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user