<#7566 fix(plugins/ray): honor RECOVERABLE error.p...
# flyte-github
a
#7566 fix(plugins/ray): honor RECOVERABLE error.pb so Ray tasks retry Pull request opened by 1fanwang Why are the changes needed? When user code raises
FlyteRecoverableException
,
pyflyte-execute
writes a
RECOVERABLE
error to
error.pb
, and container/pod tasks retry on it. A Ray task doesn't: a failed
RayJob
surfaces as a terminal phase, and the Ray plugin's
GetTaskPhase
reports it without ever reading
error.pb
. So the same recoverable failure — e.g. a transient
ObjectReconstructionFailedLineageEvictedError
— terminates a Ray task as a
USER
error and never fires its
retries
, inconsistent with every other task type. (The k8s plugin manager only consults
error.pb
on the
PhaseSuccess
path, which a failed RayJob never reaches.) What changes were proposed in this pull request? In the
JobDeploymentStatusFailed
branch of the Ray plugin's
GetTaskPhase
, read
error.pb
and map a
RECOVERABLE
error to a retryable failure. When the file is absent or unreadable the phase stays terminal, preserving today's behavior. How was this patch tested?
TestGetTaskPhase_RecoverableErrorFile
covers all three cases —
RECOVERABLE
→ retryable,
NON_RECOVERABLE
→ permanent, absent → permanent — and reverting the fix flips the first back to permanent. Also end-to-end: wrote the
RECOVERABLE
error.pb
that
pyflyte-execute
produces to a real blob store and drove
GetTaskPhase
through the real file reader (before: permanent, after: retryable), with the triggering
RayJob
status confirmed on a live KubeRay cluster — a failing job settles at
jobDeploymentStatus: Failed
, exactly the status this branch reads. Labels fixed Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. flyteorg/flyte