Skip to content

Stop hiding scheduling type for away jobs - #5133

Merged
JamesMurkin merged 1 commit into
masterfrom
remove_away_scheduling_type
Aug 27, 2026
Merged

Stop hiding scheduling type for away jobs#5133
JamesMurkin merged 1 commit into
masterfrom
remove_away_scheduling_type

Conversation

@JamesMurkin

Copy link
Copy Markdown
Contributor

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

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
JamesMurkin marked this pull request as ready for review August 27, 2026 09:20
@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR separates placement location from scheduling method so away jobs retain whether they were scheduled normally or through preemption.

  • Removes the ScheduledAsAwayJob scheduling-method value.
  • Records away placement through the existing ScheduledAway flag.
  • Adds a placement_type label to scheduled-job metrics.
  • Updates node-database and metrics tests for the separated dimensions.

Confidence Score: 5/5

The 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.

Important Files Changed

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

@mergify

mergify Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@JamesMurkin
JamesMurkin merged commit 97b0408 into master Aug 27, 2026
18 checks passed
@JamesMurkin
JamesMurkin deleted the remove_away_scheduling_type branch August 27, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants