-
Notifications
You must be signed in to change notification settings - Fork 883
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
fix(underused): Do not check overused when there is no UnderUsedResourceFn added #1726
Conversation
19c57a1
to
e32ec1a
Compare
/assign @Thor-wl |
Thanks for the fix. |
/hold |
@@ -205,7 +205,7 @@ func (alloc *Action) Execute(ssn *framework.Session) { | |||
// Check whether the queue is overused on dimension that the task requested | |||
taskRequest := task.Resreq.ResourceNames() | |||
|
|||
if !ssn.UnderusedResources(queue).Contains(taskRequest) { | |||
if ssn.UnderusedResourceRegistered() && !ssn.UnderusedResources(queue).Contains(taskRequest) { |
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.
return nil
if no fn registered, return []
if no under-used resources.
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.
updated
e32ec1a
to
8cef261
Compare
4c5a6c2
to
8d7ecb0
Compare
…rceFn added Signed-off-by: eggiter <haodonglyu@gmail.com>
8d7ecb0
to
8aafa2e
Compare
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 overall
/hold cancel /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: k82cn, Thor-wl 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 |
UnderUsedResourceFn
added.