From f32132b1c4b5dec3213f82154f372c3179d3d55c Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Mon, 29 Apr 2024 12:34:24 +0800 Subject: [PATCH] fix(databricks): Handle FAILED state as retryable error (#5277) Signed-off-by: Kevin Su --- flyteplugins/go/tasks/plugins/webapi/databricks/plugin.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flyteplugins/go/tasks/plugins/webapi/databricks/plugin.go b/flyteplugins/go/tasks/plugins/webapi/databricks/plugin.go index b3c423acaf..6ae9a1dbe5 100644 --- a/flyteplugins/go/tasks/plugins/webapi/databricks/plugin.go +++ b/flyteplugins/go/tasks/plugins/webapi/databricks/plugin.go @@ -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) }