Skip to content

Commit 62ebc87

Browse files
Merge pull request #4978 from ruanwenjun/dev_wenjun_fixTaskMessage
fix(event): fix FailedScheduling message might inaccurate when podgroup is ready
2 parents 74cd2ce + 28238d4 commit 62ebc87

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/scheduler/api/job_info.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,12 @@ func (ji *JobInfo) FitError() string {
772772
reasons[status.String()] += len(taskMap)
773773
}
774774
reasons["minAvailable"] = int(ji.MinAvailable)
775-
reasonMsg := fmt.Sprintf("%v, %v", scheduling.PodGroupNotReady, strings.Join(sortReasonsHistogram(reasons), ", "))
775+
776+
podGroupStatus := scheduling.PodGroupNotReady
777+
if ji.IsReady() {
778+
podGroupStatus = scheduling.PodGroupReady
779+
}
780+
reasonMsg := fmt.Sprintf("%v, %v", podGroupStatus, strings.Join(sortReasonsHistogram(reasons), ", "))
776781

777782
// Stat histogram for pending tasks only
778783
reasons = make(map[string]int)

0 commit comments

Comments
 (0)