mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-01 14:22:17 +00:00
doSchedule currently accepts err values from previous invocation delegating error handling in a location different from the caller which can be hard to debug and is not a good practice. We still maintain the same invariants after the refactoring. If an err happened in a previous invocation to Register, the returned task object was nil causing task.AcceptedOffer() to return false. By not invoking doSchedule in case of an error we can eliminate the first `err == nil` check in doScheduler.
Kubernetes Contrib is moving!
Checkout https://github.com/kubernetes/contrib for anything that is missing here!