Skip to content

Commit 67300af

Browse files
committed
adapt to new PreScore() interface
1 parent 6022686 commit 67300af

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/trimaran/lowriskovercommitment/lowriskovercommitment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func New(_ context.Context, obj runtime.Object, handle framework.Handle) (framew
8989
}
9090

9191
// PreScore : calculate pod requests and limits and store as plugin state data to be used during scoring
92-
func (pl *LowRiskOverCommitment) PreScore(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodes []*v1.Node) *framework.Status {
92+
func (pl *LowRiskOverCommitment) PreScore(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodes []*framework.NodeInfo) *framework.Status {
9393
klog.V(6).InfoS("PreScore: Calculating pod resource requests and limits", "pod", klog.KObj(pod))
9494
podResourcesStateData := CreatePodResourcesStateData(pod)
9595
cycleState.Write(PodResourcesKey, podResourcesStateData)

pkg/trimaran/lowriskovercommitment/lowriskovercommitment_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ func TestLowRiskOverCommitment_Score(t *testing.T) {
217217
p, _ := New(ctx, &lowRiskOverCommitmentArgs, fh)
218218

219219
preScorePlugin := p.(framework.PreScorePlugin)
220-
status := preScorePlugin.PreScore(context.Background(), state, tt.pod, tt.nodes)
220+
status := preScorePlugin.PreScore(context.Background(), state, tt.pod, tf.BuildNodeInfos(tt.nodes))
221221
assert.True(t, status.IsSuccess())
222222

223223
scorePlugin := p.(framework.ScorePlugin)

0 commit comments

Comments
 (0)