scheduler-plugins icon indicating copy to clipboard operation
scheduler-plugins copied to clipboard

Add ctx param and error return to EnqueueExtensions.EventsToRegister()

Open googs1025 opened this issue 1 year ago • 2 comments

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

googs1025 avatar Jul 24 '24 13:07 googs1025

Adding milestone v1.31.

Huang-Wei avatar Jul 24 '24 17:07 Huang-Wei

/cc

ffromani avatar Aug 17 '24 16:08 ffromani

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.

googs1025 avatar Nov 13 '24 03:11 googs1025

/close

googs1025 avatar Nov 13 '24 03:11 googs1025

@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.

k8s-ci-robot avatar Nov 13 '24 03:11 k8s-ci-robot