Fix isDependsOnPodsReady to treat Succeeded pods as ready#5439
Fix isDependsOnPodsReady to treat Succeeded pods as ready#5439avinxshKD wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
kept it minimal, pls take a look @hzxuzhonghu @wangyang0616 |
There was a problem hiding this comment.
Code Review
This pull request updates the isDependsOnPodsReady function in the job controller to treat succeeded pods as ready by incrementing the running pod count. It also introduces a comprehensive unit test suite (TestIsDependsOnPodsReady) to verify this behavior. Feedback was provided on the unit tests to use t.Fatalf instead of t.Error for setup failures to prevent cascading errors and to include the actual error message in the logs for easier debugging.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Signed-off-by: Avinash Kumar Deepak <avinash8655279@gmail.com>
aedf7bf to
08dc71d
Compare
|
the E2E sequence queue tests appear to be flaking during DeferCleanup. Since this PR only touches the dependsOn state logic in the job controller, I believe it's unrelated to my changes. |
|
LGTM |
|
@hwdef pls take a look when get chance, thanks cc @hzxuzhonghu |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fixes a workflow-breaking bug where a task with a
dependsOndependency never starts if the dependency task completes successfully.isDependsOnPodsReadywas running acontainerStatus.Readycheck on completed pods. In Kubernetes, containers in aPodSucceededstate are terminated, meaningReadyis always false. Bypassed the container ready loop for pods inv1.PodSucceededphase.Which issue(s) this PR fixes:
Fixes #5424
Special notes for your reviewer:
Included table-driven tests in
job_controller_actions_test.gocoveringPodSucceeded,PodRunning(ready), andPodRunning(not ready) dependency states.Does this PR introduce a user-facing change?