Add ctx param and error return to EnqueueExtensions.EventsToRegister()
What would you like to be added:
Because this PR will modify the EnqueueExtensions interface, this issue is created for tracking. After waiting for the new dependency to be updated, this method needs to be modified
https://github.com/kubernetes-sigs/scheduler-plugins/blob/master/pkg/capacityscheduling/capacity_scheduling.go#L194
https://github.com/kubernetes-sigs/scheduler-plugins/blob/master/pkg/coscheduling/coscheduling.go#L105
https://github.com/kubernetes-sigs/scheduler-plugins/blob/master/pkg/noderesourcetopology/plugin.go#L123
type EnqueueExtensions interface {
Plugin
// EventsToRegister returns a series of possible events that may cause a Pod
// failed by this plugin schedulable. Each event has a callback function that
// filters out events to reduce useless retry of Pod's scheduling.
// The events will be registered when instantiating the internal scheduling queue,
// and leveraged to build event handlers dynamically.
// Note: the returned list needs to be static (not depend on configuration parameters);
// otherwise it would lead to undefined behavior.
//
// Appropriate implementation of this function will make Pod's re-scheduling accurate and performant.
EventsToRegister(context.Context) ([]ClusterEventWithHint, error)
}
Why is this needed:
- discuss in this issue https://github.com/kubernetes/kubernetes/issues/119323
Adding milestone v1.31.
/cc
part of https://github.com/kubernetes-sigs/scheduler-plugins/pull/832
I think this has been tracked and is ready to be resolved, so I'm closing this issue.
/close
@googs1025: Closing this issue.
In response to this:
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.