Skip to content

Commit 7bbed6f

Browse files
committed
Updates due to API changes in NewChedulerContext API
Signed-off-by: Shmuel Kallner <[email protected]>
1 parent 05954ac commit 7bbed6f

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

pkg/epp/scheduling/plugins/filter/filter_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func TestFilter(t *testing.T) {
5252

5353
for _, test := range tests {
5454
t.Run(test.name, func(t *testing.T) {
55-
ctx := types.NewSchedulingContext(context.Background(), test.req, test.input)
55+
ctx := types.NewSchedulingContext(context.Background(), test.req, nil, test.input)
5656
got := test.filter.Filter(ctx, test.input)
5757

5858
if diff := cmp.Diff(test.output, got); diff != "" {
@@ -187,7 +187,7 @@ func TestFilterFunc(t *testing.T) {
187187

188188
for _, test := range tests {
189189
t.Run(test.name, func(t *testing.T) {
190-
ctx := types.NewSchedulingContext(context.Background(), test.req, test.input)
190+
ctx := types.NewSchedulingContext(context.Background(), test.req, nil, test.input)
191191
got := test.f(ctx, test.input)
192192

193193
if diff := cmp.Diff(test.output, got); diff != "" {
@@ -244,7 +244,7 @@ func TestLoRASoftAffinityDistribution(t *testing.T) {
244244
},
245245
},
246246
}
247-
ctx := types.NewSchedulingContext(context.Background(), req, pods)
247+
ctx := types.NewSchedulingContext(context.Background(), req, nil, pods)
248248

249249
// Run the filter function multiple times and count the results
250250
affinityCount := 0

pkg/epp/scheduling/plugins/scorer/kvcache_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func TestKvCacheScorer(t *testing.T) {
8282

8383
for _, tt := range tests {
8484
t.Run(tt.name, func(t *testing.T) {
85-
ctx := types.NewSchedulingContext(context.Background(), &types.LLMRequest{}, tt.pods)
85+
ctx := types.NewSchedulingContext(context.Background(), &types.LLMRequest{}, nil, tt.pods)
8686
scorer := &KVCacheScorer{}
8787
scores := scorer.Score(ctx, tt.pods)
8888

pkg/epp/scheduling/plugins/scorer/queue_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func TestQueueScorer(t *testing.T) {
7373

7474
for _, tt := range tests {
7575
t.Run(tt.name, func(t *testing.T) {
76-
ctx := types.NewSchedulingContext(context.Background(), &types.LLMRequest{}, tt.pods)
76+
ctx := types.NewSchedulingContext(context.Background(), &types.LLMRequest{}, nil, tt.pods)
7777
scores := scorer.Score(ctx, tt.pods)
7878

7979
for i, pod := range tt.pods {

pkg/epp/scheduling/scheduler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (s *Scheduler) Schedule(ctx context.Context, req *types.LLMRequest) (*types
108108
// Snapshot pod metrics from the datastore to:
109109
// 1. Reduce concurrent access to the datastore.
110110
// 2. Ensure consistent data during the scheduling operation of a request.
111-
sCtx := types.NewSchedulingContext(ctx, req, types.ToSchedulerPodMetrics(s.datastore.PodGetAll()))
111+
sCtx := types.NewSchedulingContext(ctx, req, nil, types.ToSchedulerPodMetrics(s.datastore.PodGetAll()))
112112
loggerDebug.Info(fmt.Sprintf("Scheduling a request, Metrics: %+v", sCtx.PodsSnapshot))
113113

114114
return s.ScheduleWithContext(sCtx, req)

0 commit comments

Comments
 (0)