feat: add worker-0 fast-fail and host maintenance retry to clustered plugin#7418
Open
AdilFayyaz wants to merge 1 commit into
Open
feat: add worker-0 fast-fail and host maintenance retry to clustered plugin#7418AdilFayyaz wants to merge 1 commit into
AdilFayyaz wants to merge 1 commit into
Conversation
3 tasks
Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com>
d797483 to
968df9f
Compare
pingsutw
reviewed
May 23, 2026
| // Read spec for failure-policy flags (restart_on_host_maintenance). | ||
| var spec clusteredpb.ClusteredTaskSpec | ||
| if taskTemplate, err := pluginContext.TaskReader().Read(ctx); err == nil && taskTemplate != nil { | ||
| _ = utils.UnmarshalStruct(taskTemplate.GetCustom(), &spec) //nolint:staticcheck |
Member
There was a problem hiding this comment.
Should we raise an error if it fails to unmarshal?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are the changes needed?
The PR (#7417) happy-path plugin had no way to surface pod-level failures early or distinguish infrastructure evictions from user code failures, causing wasted retry budget on maintenance events and slow failure detection.
What changes were proposed in this pull request?
maybeFastFailWorker0: whenReplicatedJobsStatus[workers].Failed > 0, callsflytek8s.DemystifyFailedOrPendingPodon the rank-0 pod (<jobset>-workers-0-0) to surface failures before the JobSet controller sets JobSetFailedmaybeSystemRetryOnMaintenance: onJobSetFailed, ifRestartOnHostMaintenance=true, inspects the rank-0 pod and reclassifies system-caused evictions asPhaseInfoSystemRetryableFailureWithCleanup— retrying without charging the user'smax_restartsbudgetGetTaskPhasenow readsClusteredTaskSpecto checkFailurePolicy.RestartOnHostMaintenanceflag; both detection paths are best-effort (fall through to normal failure if the pod is already cleaned up)How was this patch tested?
go test ./flyteplugins/go/tasks/plugins/k8s/clustered/... -v— all 15 tests passTestGetTaskPhase_FastFail_NoJobsFailed: confirms no pod lookup whenReplicatedJobsStatus[workers].Failed == 0 → returns PhaseRunningTestGetTaskPhase_MaintenanceRetry_FlagFalse: confirms JobSetFailed returnsPhaseRetryableFailurewhen RestartOnHostMaintenance=false, no pod lookup attemptedDemystifyFailedOrPendingPod) is deferred to a later PR covering E2E testsSetup process
Screenshots
Check all the applicable boxes
Related PRs
Stack
If you do use
git townto manage PR Stacks, the stack relevant to this PRwill show below. Otherwise, you can ignore this section.
mainDocs link