Repository navigation
fix: unify gang unschedulable counts across PodGroup condition, event, and Pod - #6202
Open
vishalmore90 wants to merge 1 commit into
Open
vishalmore90 wants to merge 1 commit into
vishalmore90 wants to merge 1 commit into
Conversation
Contributor
|
[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 |
Author
|
/review |
Member
|
Thanks. I will review it recently, but your ut failed, please check the CI's log @vishalmore90 |
Signed-off-by: vishal <httpsvishal07@gmail.com>
vishalmore90
force-pushed
the
fix-issue-6200
branch
from
November 3, 2026 16:03
ec02fed to
789dda4
Compare
Author
|
@JesseStutler Please Take A Look whenever u get chance |
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.
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fixes an inconsistency between PodGroup conditions, PodGroup warning events, and Pod status conditions when a gang scheduling restriction cannot be satisfied.
Prior to this PR:
gang.OnSessionClosecalculated the unmet task count usingminAvailable - schedulableTaskNum()when recording the PodGroupUnschedulablecondition.SchedulerCache.RecordJobStatusEventrecalculated the PodGroup warning event message usinglen(job.TaskStatusIndex[Pending]), leading to different task counts being reported for the event vs the condition.job.FitError(), omitting theN/M tasks in gang unschedulable:prefix specified indocs/design/scheduling-reason.md.This PR:
GetPodGroupConditionandSchedulableTaskNumtoJobInfoto share the calculation logic.SchedulerCache.RecordJobStatusEventto reuse thePodGroupunschedulable condition message for both the PodGroup warning event and pending pod fallback condition.job.MinAvailable - job.SchedulableTaskNum()when computing gang unready task count if the condition message is not pre-populated.pkg/scheduler/apiandpkg/scheduler/cache.Which issue(s) this PR fixes:
Fixes #6200
Special notes for your reviewer:
AI disclosure: Prepared with assistance from AI coding tools adhering to Volcano's AI guidance in CONTRIBUTING.md. All code, tests, and verifications were reviewed and verified against repo guidelines.
Does this PR introduce a user-facing change?