Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
fixed correct propagation of launchplan start error (#598)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Rammer <[email protected]>
  • Loading branch information
hamersaw authored Aug 4, 2023
1 parent d5accc7 commit 83d95dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions pkg/controller/nodes/subworkflow/launchplan.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ func (l *launchPlanHandler) StartLaunchPlan(ctx context.Context, nCtx interfaces
if launchplan.IsAlreadyExists(err) {
logger.Infof(ctx, "Execution already exists [%s].", childID.Name)
} else if launchplan.IsUserError(err) {
return handler.DoTransition(handler.TransitionTypeEphemeral, handler.PhaseInfoFailure(core.ExecutionError_USER, errors.RuntimeExecutionError, err.Error(), &handler.ExecutionInfo{
WorkflowNodeInfo: &handler.WorkflowNodeInfo{LaunchedWorkflowID: childID},
})), nil
return handler.DoTransition(handler.TransitionTypeEphemeral, handler.PhaseInfoFailure(core.ExecutionError_USER, errors.RuntimeExecutionError, err.Error(), nil)), nil
} else {
return handler.UnknownTransition, err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/nodes/subworkflow/launchplan/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ func (a *adminLaunchPlanExecutor) Kill(ctx context.Context, executionID *core.Wo
}
_, err := a.adminClient.TerminateExecution(ctx, req)
if err != nil {
if status.Code(err) == codes.NotFound {
err := evtErr.WrapError(err)
if evtErr.IsNotFound(err) {
return nil
}

err = evtErr.WrapError(err)
if evtErr.IsEventAlreadyInTerminalStateError(err) {
return nil
}
Expand Down

0 comments on commit 83d95dc

Please sign in to comment.