Skip to content

Commit

Permalink
Set scheduling termination reason when scheduling constraint hit (#3655)
Browse files Browse the repository at this point in the history
This will make it clear if the scheduling round finished early due to hitting a constraint (rate limit, resource scheduling limit)

Currently it just says "no remaining candidate jobs" even if actually the reason the scheduling ended was because we hit a limit

Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com>
  • Loading branch information
JamesMurkin authored Jun 6, 2024
1 parent 99d7ecb commit f0ec4b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/scheduler/queue_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func (sch *QueueScheduler) Schedule(ctx *armadacontext.Context) (*SchedulerResul
} else if schedulerconstraints.IsTerminalUnschedulableReason(unschedulableReason) {
// If unschedulableReason indicates no more new jobs can be scheduled,
// instruct the underlying iterator to only yield evicted jobs from now on.
sch.schedulingContext.TerminationReason = unschedulableReason
sch.candidateGangIterator.OnlyYieldEvicted()
} else if schedulerconstraints.IsTerminalQueueUnschedulableReason(unschedulableReason) {
// If unschedulableReason indicates no more new jobs can be scheduled for this queue,
Expand Down

0 comments on commit f0ec4b4

Please sign in to comment.