Skip to content

Commit

Permalink
fixed correct propagation of launchplan start error (flyteorg#598)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Rammer <daniel@union.ai>
  • Loading branch information
hamersaw authored Aug 4, 2023
1 parent 3bfb3ff commit 95bdaf7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
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
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 95bdaf7

Please sign in to comment.