Closed Nimbus318 closed 3 weeks ago
A very god PR, please sign your commit:)
@archlitchi Thanks for the reminder! I've signed the commit now. Please check and let me know if everything looks good. :)
/approve
All modified and coverable lines are covered by tests :white_check_mark:
Flag | Coverage Δ | |
---|---|---|
unittests | 27.09% <100.00%> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Files with missing lines | Coverage Δ | |
---|---|---|
pkg/scheduler/score.go | 67.05% <100.00%> (ø) |
What type of PR is this? /kind bug
What this PR does / why we need it: This PR fixes a bug in the scheduler where an array out-of-bounds error occurs when a GPU container is placed between non-GPU containers in a multi-container Pod. The bug manifests when the GPU container must be positioned at the beginning or end of the container list, otherwise, it leads to a panic with an array index error. Ensuring that the length of
score.Devices[idx]
is sufficient before appending resolves this issue. The scheduler now handles this scenario by extending thescore.Devices
array correctly.Which issue(s) this PR fixes: Fixes #571
Special notes for your reviewer: None
Does this PR introduce a user-facing change?: None