Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial Admission Preemption Panic #2799

Closed
gabesaba opened this issue Aug 8, 2024 · 2 comments · Fixed by #2826
Closed

Partial Admission Preemption Panic #2799

gabesaba opened this issue Aug 8, 2024 · 2 comments · Fixed by #2826
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@gabesaba
Copy link
Contributor

gabesaba commented Aug 8, 2024

What happened:
While refactoring Preemptor.GetTargets, I encountered a panic. Furthermore, I discovered that we are not exercising the PartialAdmission preemption logic in any of our tests, and it may be broken and panicking generally.

This test exits here, as we find a preemption target above. The PartialAdmission preemption path is not tested.

In this test, we exit here. We panic when calling assignment.TotalRequestsFor, as this map is empty

How to reproduce it (as minimally and precisely as possible):

Move this line to the top of Preemptor.GetTargets and observe a panic during this test

wlReq := assignment.TotalRequestsFor(&wl)

Delete these lines and observe that unit and integration tests still pass

preemptionTargets := s.preemptor.GetTargets(log, *wl, assignment, snap)
if len(preemptionTargets) > 0 {
return &partialAssignment{assignment: assignment, preemptionTargets: preemptionTargets}, true
}
return nil, false

@gabesaba gabesaba added the kind/bug Categorizes issue or PR as related to a bug. label Aug 8, 2024
@gabesaba
Copy link
Contributor Author

gabesaba commented Aug 8, 2024

cc @mimowo @mbobrovskyi

@mbobrovskyi
Copy link
Contributor

/assign @trasc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants