Change:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! If the matter is security related, please disclose it privately via --here is supposed to be set through , but is not called from anywhere except tests, so always returns . should be set through here. Am I missing something? N/A None Kubernetes version (use ): master () Cloud provider or hardware configuration: N/A OS (e.g: ): N/A Kernel (e.g. ): N/A Install tools: N/A Network plugin and version (if this is a network-related bug): N/A Others: None
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig scheduling
Thanks for pointing that out. The plumbing of extenders to the framework impact calling extenders on preemption. That seems to be a path not covered by tests end to end. Can you submit a PR to fix this? as you mentioned we need to pass the extenders on profile creation. We need to patch the fix back to v1.21 and v1.20 (the release where this was refactored). /cc
I have submitted a PR for a fix.

Discussion:
frameworkruntime.WithCaptureProfile(frameworkruntime.CaptureProfile(c.frameworkCapturer)), frameworkruntime.WithClusterEventMap(c.clusterEventMap), frameworkruntime.WithParallelism(int(c.parallellism)), <ins> frameworkruntime.WithExtenders(extenders), </ins> ) if err != nil { return nil, fmt.Errorf("initializing profiles: %v", err)

"Foo": defaultbinder.New, } cases := []struct { <del> name         string opts         []Option wantErr      string wantProfiles []string </del> <ins> name          string opts          []Option wantErr       string wantProfiles  []string wantExtenders []string </ins> }{ { name: "valid out-of-tree registry",

)}, wantErr: "duplicate profile with scheduler name "foo"", }, <ins> { name: "With extenders", opts: []Option{ WithProfiles( schedulerapi.KubeSchedulerProfile{ SchedulerName: "default-scheduler", Plugins: &schedulerapi.Plugins{ QueueSort: schedulerapi.PluginSet{Enabled: []schedulerapi.Plugin{{Name: "PrioritySort"}}}, Bind:      schedulerapi.PluginSet{Enabled: []schedulerapi.Plugin{{Name: "DefaultBinder"}}}, }, }, ), WithExtenders( schedulerapi.Extender{ URLPrefix: "http://extender.kube-system/", }, ), }, wantProfiles:  []string{"default-scheduler"}, wantExtenders: []string{"http://extender.kube-system/"}, }, </ins> } for _, tc := range cases {

tc.opts..., ) <ins> // Errors </ins> if len(tc.wantErr) != 0 { if err == nil || !strings.Contains(err.Error(), tc.wantErr) { t.Errorf("got error %q, want %q", err, tc.wantErr)

if err != nil { t.Fatalf("Failed to create scheduler: %v", err) } <ins> // Profiles </ins> profiles := make([]string, 0, len(s.Profiles)) for name := range s.Profiles { profiles = append(profiles, name)

if diff := cmp.Diff(tc.wantProfiles, profiles); diff != "" { t.Errorf("unexpected profiles (-want, +got):n%s", diff) } <ins> // Extenders if len(tc.wantExtenders) != 0 { // Scheduler.Extenders extenders := make([]string, 0, len(s.Extenders)) for _, e := range s.Extenders { extenders = append(extenders, e.Name()) } if diff := cmp.Diff(tc.wantExtenders, extenders); diff != "" { t.Errorf("unexpected extenders (-want, +got):n%s", diff) } // framework.Handle.Extenders() for _, p := range s.Profiles { extenders := make([]string, 0, len(p.Extenders())) for _, e := range p.Extenders() { extenders = append(extenders, e.Name()) } if diff := cmp.Diff(tc.wantExtenders, extenders); diff != "" { t.Errorf("unexpected extenders (-want, +got):n%s", diff) } } } </ins> }) } }