Merge pull request #117834 from NoicFank/cleanup-scheduler-node-must-not-nil-in-snapshot

cleanup useless null pointer check about nodeInfo.Node() from snapshot for in-tree plugins
This commit is contained in:
Kubernetes Prow Robot
2023-05-20 15:16:18 -07:00
committed by GitHub
14 changed files with 177 additions and 51 deletions

View File

@@ -933,7 +933,7 @@ func (f *frameworkImpl) RunFilterPluginsWithNominatedPods(ctx context.Context, s
// to run on the node. It returns 1) whether any pod was added, 2) augmented cycleState,
// 3) augmented nodeInfo.
func addNominatedPods(ctx context.Context, fh framework.Handle, pod *v1.Pod, state *framework.CycleState, nodeInfo *framework.NodeInfo) (bool, *framework.CycleState, *framework.NodeInfo, error) {
if fh == nil || nodeInfo.Node() == nil {
if fh == nil {
// This may happen only in tests.
return false, state, nodeInfo, nil
}