#6295 Fix: Don't fail suspended Kubeflow jobs
Pull request opened by
fg91
## Why are the changes needed?
The flyteplugins kubeflow plugins currently fail tasks if the underlying CRD object (PyTorchJob, TfJob, MpiJob) haven't been updated by the training operator for a certain timeout period (see
here):
if app.Status.StartTime == nil && app.CreationTimestamp.Add(common.GetConfig().Timeout.Duration).Before(time.Now()) {
return pluginsCore.PhaseInfoUndefined, fmt.Errorf("kubeflow operator hasn't updated the pytorch custom resource since creation time %v", app.CreationTimestamp)
}
However, the jobs provided by the kubeflow training operator can be in a so-called "suspended" state (e.g. when
using them with an external queueing system like Kueue). Jobs in a suspended state are expected to not be updated by the training operator.
## What changes were proposed in this pull request?
I propose to add a check for suspension to the error condition in the code snippet above so that the flyteplugin ignores unmodified kubeflow jobs if they are in a suspended state.
Please note that other flyteplugins like
spark or
ray don't have this "CRD has been updated" check at all so this change does not introduce inconsistency.
## How was this patch tested?
Added unit tests. Ran flytepropeller image with this change in cluster.
## Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
## Related PRs
### Summary by Bito
This PR updates Kubeflow plugins (MPI, PyTorch, TensorFlow) to properly handle suspended jobs by adding suspension checks to timeout failure conditions. It also addresses updating protobuf API definitions across languages, enhancing connector plugins, improving terminal state detection logic, and fixing variable shadowing in nested loops.
Unit tests added: False
Estimated effort to review (1-5, lower is better): 5
flyteorg/flyte