Make submit check use same code as scheduling_algo to construct nodedb - #5119
Merged
Conversation
The submitcheck needs a nodedb to see if a job is considered schedulable by the scheduler However currently it gets this nodedb in a bespoke way which is sub-optimal: - Builds a nodedb per executor (rather than per pool as the scheduler does) - Has to reconfigure the nodedb constantly, as different pools set different nodedb scheduling configs - Cannot check if some valid gangs are schedulable, submitcheck does not allow cross-cluster gangs but the scheduler does - We always need to remember any changes to building the nodedb for the scheduler also need to be applied to the submitcheck Now we do away with these problems by: - Using the same code to build the nodedb in the submitcheck and the core scheduler - Create a nodedb per pool to match how the scheduler does it This should keep the 2 paths more inline and reduce burden going forward - We should probably improve the current code path for instantiating a nodedb, but that is one for a separate PR Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com>
JamesMurkin
marked this pull request as ready for review
August 17, 2026 16:41
|
🔗 Commit SHA: b3cf04a | Docs | Datadog PR Page | Give us feedback! |
Contributor
Greptile SummaryThe PR consolidates NodeDb construction between submit checking and the scheduling algorithm and changes submit checking from per-executor to per-pool evaluation.
Confidence Score: 5/5The PR appears safe to merge because no eligible blocking failure or outstanding prior finding remains. No blocking failure remains within the scope of this follow-up review.
|
| Filename | Overview |
|---|---|
| internal/scheduler/configuration/configuration.go | Adds a PoolConfig helper exposing the enabled state of cross-pool-first preemption. |
| internal/scheduler/scheduling/scheduling_algo.go | Extracts reusable NodeDb construction and moves scheduling-option configuration into that shared path. |
| internal/scheduler/submitcheck.go | Replaces per-executor NodeDbs with per-pool NodeDbs combining home and configured away-pool nodes. |
| internal/scheduler/submitcheck_test.go | Adds submit-check coverage for a gang whose members fit across multiple executors. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
E[Executor snapshots] --> N[Convert executor nodes]
N --> G[Group nodes by pool]
G --> H[Combine home and configured away-pool nodes]
H --> C[Shared ConstructNodeDb]
C --> D[Per-pool NodeDb]
D --> S[Submit-check gang scheduling]
C --> A[Core scheduling algorithm]
Reviews (3): Last reviewed commit: "Make ShouldPreemptCrossPoolJobsFirst fun..." | Re-trigger Greptile
Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com>
nikola-jokic
approved these changes
Aug 18, 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.
The submitcheck needs a nodedb to see if a job is considered schedulable by the scheduler
However currently it gets this nodedb in a bespoke way which is sub-optimal:
Now we do away with these problems by:
This should keep the 2 paths more inline and reduce burden going forward