Skip to content

Commit

Permalink
fix(databricks): Handle FAILED state as retryable error (#5277)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw authored Apr 29, 2024
1 parent 95e9ac8 commit f32132b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flyteplugins/go/tasks/plugins/webapi/databricks/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,14 @@ func (p Plugin) Status(ctx context.Context, taskCtx webapi.StatusContext) (phase
return core.PhaseInfoFailure(string(rune(http.StatusInternalServerError)), "failed to write output", taskInfo), nil
}
return core.PhaseInfoSuccess(taskInfo), nil
} else if resultState == "FAILED" {
return core.PhaseInfoRetryableFailure("job failed", message, taskInfo), nil
}
return core.PhaseInfoFailure(pluginErrors.TaskFailedWithError, message, taskInfo), nil
case "SKIPPED":
return core.PhaseInfoFailure(string(rune(http.StatusConflict)), message, taskInfo), nil
case "INTERNAL_ERROR":
return core.PhaseInfoFailure(string(rune(http.StatusInternalServerError)), message, taskInfo), nil
return core.PhaseInfoRetryableFailure(string(rune(http.StatusInternalServerError)), message, taskInfo), nil
}
return core.PhaseInfoUndefined, pluginErrors.Errorf(pluginsCore.SystemErrorCode, "unknown execution phase [%v].", lifeCycleState)
}
Expand Down

0 comments on commit f32132b

Please sign in to comment.