Skip to main content

DemystifyPending

DemystifyPending is one the core functions, that helps FlytePropeller determine if a pending pod is indeed pending, or it is actually stuck in a un-reparable state. In such a case the pod should be marked as dead and the task should be retried. This has to be handled sadly, as K8s is still largely designed for long running services that should recover from failures, but Flyte pods are completely automated and should either run or fail

def DemystifyPending(
status: v1.PodStatus,
info: pluginsCore.TaskInfo
) - > pluginsCore.PhaseInfo, error

Determines if a pending Kubernetes pod is genuinely pending or stuck in an unrecoverable state, marking it as dead for retry if necessary. This function addresses the challenge of Kubernetes being designed for long-running services, whereas Flyte pods require automated failure handling.

Parameters

NameTypeDescription
statusv1.PodStatusThe current status of the Kubernetes pod, containing information like its phase, conditions, and container statuses.
infopluginsCore.TaskInfoAdditional information about the task associated with the pod, used for context and potential updates.

Returns

TypeDescription
pluginsCore.PhaseInfo, errorA PhaseInfo object indicating the pod's current state (e.g., queued, terminal failure) and an error if one occurred during processing.