Stop hiding scheduling type for away jobs - #5133
Merged
Merged
Conversation
Currently we mark all jobs scheduled away as SchedulingType="away", however this means the actual scheduling type is lost (i.e was it scheduled was preemption or not?) I've now removed the ScheduleAsAwayJob SchedulingType and we now leverage the existing ScheduledAway flag This is now reflected in metrics with a new label 'placement_type' which determines if the scheduling was home or away Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com>
JamesMurkin
marked this pull request as ready for review
August 27, 2026 09:20
Contributor
Greptile SummaryThe PR separates placement location from scheduling method so away jobs retain whether they were scheduled normally or through preemption.
Confidence Score: 5/5The PR appears safe to merge with no concrete correctness, security, or compatibility failure identified. Successful home and away selection paths consistently assign the actual scheduling method, away placement is represented independently, and the metric's new label cardinality is handled correctly in production and tests.
|
| Filename | Overview |
|---|---|
| internal/scheduler/nodedb/nodedb.go | Preserves the scheduling method selected by the shared node-selection path while marking successful away placement separately. |
| internal/scheduler/metrics/cycle_metrics.go | Adds the placement dimension to scheduled-job metrics and derives it independently from the scheduling method. |
| internal/scheduler/scheduling/context/pod.go | Removes the obsolete away scheduling-method constant without leaving repository references. |
| internal/scheduler/nodedb/nodedb_test.go | Updates away-placement assertions to verify both the placement flag and actual scheduling method. |
| internal/scheduler/metrics/cycle_metrics_test.go | Updates metric label values used by reset and disable tests for the new placement dimension. |
Reviews (1): Last reviewed commit: "Stop hiding scheduling type for away job..." | Re-trigger Greptile
nikola-jokic
approved these changes
Aug 27, 2026
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
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.
Currently we mark all jobs scheduled away as SchedulingType="away", however this means the actual scheduling type is lost (i.e was it scheduled was preemption or not?)
I've now removed the ScheduleAsAwayJob SchedulingType and we now leverage the existing ScheduledAway flag
This is now reflected in metrics with a new label 'placement_type' which determines if the scheduling was home or away