Skip to content

Refactor scheduler result #4652

Merged
JamesMurkin merged 4 commits intomasterfrom
scheduler_result_refactor
Feb 4, 2026
Merged

Refactor scheduler result #4652
JamesMurkin merged 4 commits intomasterfrom
scheduler_result_refactor

Conversation

@JamesMurkin
Copy link
Contributor

Currently SchedulerResult:

  • Is used as the external interface to scheduling_algo and the internal types, which means the internal types are using more complex objects than needed
  • Pool information is scattered around the result
  • Some information is duplicated (and could be inconsistent) such as ScheduledJobs/PreemptedJobs

This PR refactors it so:

  • SchedulerResult is now better tailored only as an external result from scheduling_algo
  • The result is purely by pool
    • To avoid duplication
    • Simplify the representation (remove maps of result by pool)
  • Has helper functions to act similar as before if you just want all scheduled jobs etc

Currently SchedulerResult:
 - Is used as the external interface to scheduling_algo and the internal types, which means the internal types are using more complex objects than needed
 - Pool information is scattered around the result
 - Some information is duplicated (and could be inconsistent) such as ScheduledJobs/PreemptedJobs

This PR refactors it so:
 - SchedulerResult is now better tailored only as an external result from scheduling_algo
 - The result is purely by pool
   - To avoid duplication
   - Simplify the representation (remove maps of result by pool)
 - Has helper functions to act similar as before if you just want all scheduled jobs etc

Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com>
Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com>
@JamesMurkin JamesMurkin marked this pull request as ready for review February 2, 2026 15:34
@JamesMurkin JamesMurkin enabled auto-merge (squash) February 4, 2026 12:42
@JamesMurkin JamesMurkin merged commit d493fdd into master Feb 4, 2026
14 checks passed
@JamesMurkin JamesMurkin deleted the scheduler_result_refactor branch February 4, 2026 12:54
dslear pushed a commit to dslear/armada that referenced this pull request Feb 9, 2026
Currently SchedulerResult:
- Is used as the external interface to scheduling_algo and the internal
types, which means the internal types are using more complex objects
than needed
 - Pool information is scattered around the result
- Some information is duplicated (and could be inconsistent) such as
ScheduledJobs/PreemptedJobs

This PR refactors it so:
- SchedulerResult is now better tailored only as an external result from
scheduling_algo
 - The result is purely by pool
   - To avoid duplication
   - Simplify the representation (remove maps of result by pool)
- Has helper functions to act similar as before if you just want all
scheduled jobs etc

---------

Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com>
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