-
Notifications
You must be signed in to change notification settings - Fork 280
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
TAS: assign pods based on ranks for Job #3539
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mimowo 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 |
cc @PBundyra |
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
3dd5e07
to
4e927f0
Compare
4e927f0
to
c481f07
Compare
c481f07
to
1024b0a
Compare
1024b0a
to
63e0aa6
Compare
} | ||
} | ||
slices.SortFunc(sortableDomains, func(a, b sortableDomainWithCount) int { | ||
return strings.Compare(a.sortName, b.sortName) |
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.
How about joining domain.Values
here to sort domains, instead of introducing a new type
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.
We could techanically, but I think this would be worse performance, as then we need to recompute multiple times, when comparing say "a" against "b" then "c".
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.
Alternative is to simply make the TopologyDomainID type comparable.
EDIT: which actually is, because this is a string, and already sorted as we want.
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 have simplified it, PTAL
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, thank you
9880a71
to
d7bef13
Compare
d7bef13
to
4c8f9e5
Compare
@PBundyra anything missing before we merge? |
We discussed offline that e2e tests will be added in a follow up PR. In that case, LGTM. Thanks @mimowo |
LGTM label has been added. Git tree hash: 39f3531dae9b9572fd3cfb03704850534dbfb9c2
|
* TAS: support ranks for Job * Review remarks
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Part of #3533
Part of #3450
Special notes for your reviewer:
Does this PR introduce a user-facing change?