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

Commit 83d95dc

Browse files
authored
fixed correct propagation of launchplan start error (#598)
Signed-off-by: Daniel Rammer <[email protected]>
1 parent d5accc7 commit 83d95dc

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

pkg/controller/nodes/subworkflow/launchplan.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ func (l *launchPlanHandler) StartLaunchPlan(ctx context.Context, nCtx interfaces
109109
if launchplan.IsAlreadyExists(err) {
110110
logger.Infof(ctx, "Execution already exists [%s].", childID.Name)
111111
} else if launchplan.IsUserError(err) {
112-
return handler.DoTransition(handler.TransitionTypeEphemeral, handler.PhaseInfoFailure(core.ExecutionError_USER, errors.RuntimeExecutionError, err.Error(), &handler.ExecutionInfo{
113-
WorkflowNodeInfo: &handler.WorkflowNodeInfo{LaunchedWorkflowID: childID},
114-
})), nil
112+
return handler.DoTransition(handler.TransitionTypeEphemeral, handler.PhaseInfoFailure(core.ExecutionError_USER, errors.RuntimeExecutionError, err.Error(), nil)), nil
115113
} else {
116114
return handler.UnknownTransition, err
117115
}

pkg/controller/nodes/subworkflow/launchplan/admin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ func (a *adminLaunchPlanExecutor) Kill(ctx context.Context, executionID *core.Wo
192192
}
193193
_, err := a.adminClient.TerminateExecution(ctx, req)
194194
if err != nil {
195-
if status.Code(err) == codes.NotFound {
195+
err := evtErr.WrapError(err)
196+
if evtErr.IsNotFound(err) {
196197
return nil
197198
}
198199

199-
err = evtErr.WrapError(err)
200200
if evtErr.IsEventAlreadyInTerminalStateError(err) {
201201
return nil
202202
}

0 commit comments

Comments
 (0)