Skip to content
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

Merged
merged 1 commit into from
Sep 7, 2021

Conversation

eggiter
Copy link
Member

@eggiter eggiter commented Sep 6, 2021

@volcano-sh-bot volcano-sh-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 6, 2021
@eggiter
Copy link
Member Author

eggiter commented Sep 6, 2021

/assign @Thor-wl

@eggiter eggiter changed the title fix(underused): Do not call ssn.UnderusedResources when there is no U… fix(underused): Do not call ssn.UnderusedResources when there is no UnderUsedResourceFn added Sep 6, 2021
@Thor-wl Thor-wl requested review from shinytang6, wpeng102 and jasonliu747 and removed request for alcorj-mizar September 6, 2021 11:34
@Thor-wl
Copy link
Member

Thor-wl commented Sep 6, 2021

Thanks for the fix.
/approve

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 6, 2021
@k82cn
Copy link
Member

k82cn commented Sep 7, 2021

/hold

@volcano-sh-bot volcano-sh-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 7, 2021
@@ -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) {
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@volcano-sh-bot volcano-sh-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 7, 2021
@eggiter eggiter changed the title fix(underused): Do not call ssn.UnderusedResources when there is no UnderUsedResourceFn added fix(underused): Do not check overused when there is no UnderUsedResourceFn added Sep 7, 2021
…rceFn added

Signed-off-by: eggiter <haodonglyu@gmail.com>
Copy link
Member

@shinytang6 shinytang6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm overall

@eggiter eggiter requested a review from k82cn September 7, 2021 03:44
@k82cn
Copy link
Member

k82cn commented Sep 7, 2021

/hold cancel

/lgtm
/approve

@volcano-sh-bot volcano-sh-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 7, 2021
@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 7, 2021
@volcano-sh-bot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot merged commit b8fafe0 into volcano-sh:master Sep 7, 2021
@eggiter eggiter deleted the fix-underused branch September 7, 2021 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Queues are always OVERUSED when plugin proportion is disabled
5 participants