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

TAS: assign pods based on ranks for Job #3539

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

mimowo
Copy link
Contributor

@mimowo mimowo commented Nov 15, 2024

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?

TAS: support rank-ordering of Pods for the Kubernetes batch Job.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Nov 15, 2024
@k8s-ci-robot
Copy link
Contributor

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

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 15, 2024
@mimowo
Copy link
Contributor Author

mimowo commented Nov 15, 2024

cc @PBundyra

Copy link

netlify bot commented Nov 15, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 4c8f9e5
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/673b311573a52c0008ae1dd8

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 15, 2024
@mimowo mimowo force-pushed the tas-pod-ranks-job branch 4 times, most recently from 3dd5e07 to 4e927f0 Compare November 15, 2024 11:50
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 15, 2024
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 15, 2024
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 15, 2024
@mimowo mimowo changed the title WIP: TAS: assign pods based on ranks for Job TAS: assign pods based on ranks for Job Nov 15, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 15, 2024
}
}
slices.SortFunc(sortableDomains, func(a, b sortableDomainWithCount) int {
return strings.Compare(a.sortName, b.sortName)
Copy link
Contributor

@PBundyra PBundyra Nov 18, 2024

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

Copy link
Contributor Author

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".

Copy link
Contributor Author

@mimowo mimowo Nov 18, 2024

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.

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 have simplified it, PTAL

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good, thank you

@mimowo mimowo force-pushed the tas-pod-ranks-job branch 2 times, most recently from 9880a71 to d7bef13 Compare November 18, 2024 12:08
@mimowo
Copy link
Contributor Author

mimowo commented Nov 18, 2024

@PBundyra anything missing before we merge?

@PBundyra
Copy link
Contributor

We discussed offline that e2e tests will be added in a follow up PR. In that case, LGTM. Thanks @mimowo
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 18, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 39f3531dae9b9572fd3cfb03704850534dbfb9c2

@k8s-ci-robot k8s-ci-robot merged commit 9d1ca1a into kubernetes-sigs:main Nov 18, 2024
17 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.10 milestone Nov 18, 2024
kannon92 pushed a commit to kannon92/kueue that referenced this pull request Dec 5, 2024
* TAS: support ranks for Job

* Review remarks
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants