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
| Name | Type | Description |
|---|---|---|
| currentCondition | kubeflowv1.JobCondition | The current condition of the Kubeflow job, which indicates its state (e.g., Created, Running, Succeeded, Failed). |
| occurredAt | time.Time | The timestamp when the current condition of the job was observed, used for setting the phase's occurrence time. |
| taskPhaseInfo | pluginsCore.TaskInfo | Additional information about the task associated with the Kubeflow job, which will be included in the returned phase information. |
Returns
| Type | Description |
|---|---|
pluginsCore.PhaseInfo, error | The determined phase information for the Kubeflow job and an error if the phase cannot be determined. |