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

correct propagation of launchplan start error #598

Merged
merged 2 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading