-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add queue priority #3700
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
Conversation
|
please add unit case to cover your code. thanks |
| lv := l.(*api.QueueInfo) | ||
| rv := r.(*api.QueueInfo) | ||
|
|
||
| if lv.Queue.Spec.Priority != rv.Queue.Spec.Priority { |
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.
negative means high priority.
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
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.
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.
UT in |
|
Please rebase master and squash to one commit. |
6b03cb0 to
7b6abc5
Compare
go.mod
Outdated
| 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 |
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.
This apis version is so weird
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.
Already change to volcano-sh/apis#135
go.mod
Outdated
| 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 |
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.
Please do not you your own repo
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.
I will change it when volcano-sh/apis#132 merged
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.
Already change to volcano-sh/apis#135
7b6abc5 to
91e1fe5
Compare
|
Missing volcano-sh/apis#128 in Volcano-Apis |
|
91e1fe5 to
f751d8c
Compare
Signed-off-by: bufan <[email protected]>
f751d8c to
216a66d
Compare
|
/lgtm |
|
overall, it is ok for me. |
william-wang
left a comment
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.
/approve
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Add queue priority.
Related issue: #3542
Design doc for queue priority: #3602.
volcano-sh/apis#132 in
Volcano-apisshould be merged before this PR.