Skip to content

Commit

Permalink
Update ray.go
Browse files Browse the repository at this point in the history
We have a Queue to schedule our ray jobs, so we need it to wait in Suspended state of k8s

Signed-off-by: Amin Maghsodi <[email protected]>
  • Loading branch information
aminmaghsodi authored Oct 6, 2024
1 parent 9abfbda commit e9f9579
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flyteplugins/go/tasks/plugins/k8s/ray/ray.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,8 @@ func (plugin rayJobResourceHandler) GetTaskPhase(ctx context.Context, pluginCont
phaseInfo, err = pluginsCore.PhaseInfoRunning(pluginsCore.DefaultPhaseVersion, info), nil
case rayv1.JobDeploymentStatusComplete:
phaseInfo, err = pluginsCore.PhaseInfoSuccess(info), nil
case rayv1.JobDeploymentStatusSuspended:
phaseInfo, err = pluginsCore.PhaseInfoQueuedWithTaskInfo(time.Now(), pluginsCore.DefaultPhaseVersion, "Suspended", info), nil
case rayv1.JobDeploymentStatusFailed:
failInfo := fmt.Sprintf("Failed to run Ray job %s with error: [%s] %s", rayJob.Name, rayJob.Status.Reason, rayJob.Status.Message)
phaseInfo, err = pluginsCore.PhaseInfoFailure(flyteerr.TaskFailedWithError, failInfo, info), nil
Expand Down

0 comments on commit e9f9579

Please sign in to comment.