Skip to main content

GetPhaseInfo

Returns the phase of a Kubeflow job based on its current condition.

def GetPhaseInfo(
currentCondition: kubeflowv1.JobCondition,
occurredAt: time.Time,
taskPhaseInfo: pluginsCore.TaskInfo
) - > pluginsCore.PhaseInfo, error

Determines the current phase of a Kubeflow job based on its condition and returns corresponding phase information. This function is used to translate Kubeflow job states into a standardized phase representation.

Parameters

NameTypeDescription
currentConditionkubeflowv1.JobConditionThe current condition of the Kubeflow job, which indicates its state (e.g., Created, Running, Succeeded, Failed).
occurredAttime.TimeThe timestamp when the current condition of the job was observed, used for setting the phase's occurrence time.
taskPhaseInfopluginsCore.TaskInfoAdditional information about the task associated with the Kubeflow job, which will be included in the returned phase information.

Returns

TypeDescription
pluginsCore.PhaseInfo, errorThe determined phase information for the Kubeflow job and an error if the phase cannot be determined.