-
Notifications
You must be signed in to change notification settings - Fork 40.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes 78001 The implementation of Filter extension for the new framework #78477
Conversation
Hi @YoubingLi. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
139ff34
to
ee79c27
Compare
|
You are right. I think our only viable solution is to let |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just a few minor nits in the comments.
|
||
for _, p := range f.filterPlugins { | ||
status := p.Filter(pc, pod, nodeInfo) | ||
if !status.IsSuccess() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to @ahg-g's suggestion. It makes sense to convert all codes other than "Unschedulable" to an Error
/retest |
1 similar comment
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
||
for _, p := range f.filterPlugins { | ||
status := p.Filter(pc, pod, nodeInfo) | ||
if !status.IsSuccess() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YoubingLi this hasn't been addressed yet. I left a comment with the suggestion.
if !status.IsSuccess() { | ||
if status.Code() != Unschedulable { | ||
klog.Errorf("RunFilterPlugins: error while running %s filter plugin for pod %s: %s", | ||
p.Name(), pod.Name, status.Message()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suggestion in the previous comment is to do something like this:
errMsg := fmt.Sprintf("RunFilterPlugins: error while running %s filter plugin for pod %s: %s",
p.Name(), pod.Name, status.Message())
klog.Errorf(errMsg)
return NewStatus(Error, errMsg)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been addressed in the latest diff
/lgtm |
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Please take a look the new diff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
Thanks, @YoubingLi!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bsalamat, YoubingLi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
The implementation of Filter extension point
Which issue(s) this PR fixes:
Fixes #78001
Special notes for your reviewer:
/assign @bsalamat
/assign @Huang-Wei
Does this PR introduce a user-facing change?:
no