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

Add queue priority #3700

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Conversation

TaiPark
Copy link
Contributor

@TaiPark TaiPark commented Aug 29, 2024

Add queue priority.
Related issue: #3542
Design doc for queue priority: #3602.
volcano-sh/apis#132 in Volcano-apis should be merged before this PR.

@volcano-sh-bot volcano-sh-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 29, 2024
@lowang-bh
Copy link
Member

please add unit case to cover your code. thanks

pkg/scheduler/actions/reclaim/reclaim_test.go Outdated Show resolved Hide resolved
@@ -203,6 +203,10 @@ func (cp *capacityPlugin) OnSessionOpen(ssn *framework.Session) {
lv := l.(*api.QueueInfo)
rv := r.(*api.QueueInfo)

if lv.Queue.Spec.Priority != rv.Queue.Spec.Priority {
Copy link
Member

Choose a reason for hiding this comment

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

negative means high priority.

Copy link
Member

Choose a reason for hiding this comment

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

+1

Copy link
Contributor Author

@TaiPark TaiPark Sep 2, 2024

Choose a reason for hiding this comment

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

In this context, the expression r - l is used. When l.queuePriority > r.queuePriority, r - l is less than 0, which means l has a higher priority; when l.queuePriority < r.queuePriority, r - l is greater than 0, indicating that r has a higher priority, which meets the expectation. I will add annotations here.

@volcano-sh-bot volcano-sh-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 2, 2024
@TaiPark
Copy link
Contributor Author

TaiPark commented Sep 2, 2024

please add unit case to cover your code. thanks

UT in capacity_test and proportion_test already added

@Monokaix
Copy link
Member

Monokaix commented Sep 2, 2024

Please rebase master and squash to one commit.

@TaiPark TaiPark force-pushed the queue-priority branch 2 times, most recently from 6b03cb0 to 7b6abc5 Compare September 2, 2024 12:27
go.mod Outdated
@@ -40,7 +40,7 @@ require (
sigs.k8s.io/controller-runtime v0.13.0
sigs.k8s.io/yaml v1.3.0
stathat.com/c/consistent v1.0.0
volcano.sh/apis v1.10.0-alpha.0.0.20240709084748-78d912ce096c
volcano.sh/apis v0.0.0-00010101000000-000000000000
Copy link
Member

Choose a reason for hiding this comment

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

This apis version is so weird

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already change to volcano-sh/apis#135

go.mod Outdated
@@ -171,4 +171,5 @@ replace (
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.30.2
k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.30.2
k8s.io/sample-controller => k8s.io/sample-controller v0.30.2
volcano.sh/apis => github.com/TaiPark/volcano-apis v1.10.0
Copy link
Member

Choose a reason for hiding this comment

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

Please do not you your own repo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will change it when volcano-sh/apis#132 merged

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already change to volcano-sh/apis#135

@TaiPark
Copy link
Contributor Author

TaiPark commented Sep 4, 2024

Missing volcano-sh/apis#128 in Volcano-Apis release v1.10, should I also cherry pick it?

@TaiPark
Copy link
Contributor Author

TaiPark commented Sep 4, 2024

Missing volcano-sh/apis#128 in Volcano-Apis release v1.10, should I also cherry pick it?

pr: volcano-sh/apis#136

Signed-off-by: bufan <[email protected]>
@Monokaix
Copy link
Member

Monokaix commented Sep 4, 2024

/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 4, 2024
@william-wang
Copy link
Member

overall, it is ok for me.

Copy link
Member

@william-wang william-wang left a comment

Choose a reason for hiding this comment

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

/approve

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: william-wang

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 5, 2024
@volcano-sh-bot volcano-sh-bot merged commit b211ae5 into volcano-sh:master Sep 5, 2024
14 checks passed
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants