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

KEP 973 workload-Priority #1081

Merged
merged 1 commit into from
Sep 24, 2023
Merged

Conversation

Gekko0114
Copy link
Member

@Gekko0114 Gekko0114 commented Aug 27, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add support for workload Priority

Which issue(s) this PR fixes:

Fixes #973

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add support for workload Priority

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 27, 2023
@netlify
Copy link

netlify bot commented Aug 27, 2023

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 2c000f0
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/650e94d865f4b300080f614e

@k8s-ci-robot
Copy link
Contributor

Hi @Gekko0114. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 27, 2023
@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 Aug 29, 2023
@alculquicondor
Copy link
Contributor

Is this ready for review or still a Draft?

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 2, 2023
@Gekko0114 Gekko0114 marked this pull request as ready for review September 2, 2023 15:10
@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 Sep 2, 2023
@Gekko0114
Copy link
Member Author

Hi @alculquicondor, @tenzen-y

Could you review this PR ?
Though I will add other tests, the basic implementation has done.

@alculquicondor
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 5, 2023
apis/kueue/v1beta1/workload_types.go Outdated Show resolved Hide resolved
apis/kueue/v1beta1/workload_types.go Outdated Show resolved Hide resolved
apis/kueue/v1beta1/workloadpriorityclass_types.go Outdated Show resolved Hide resolved
pkg/controller/core/workload_controller.go Outdated Show resolved Hide resolved
pkg/controller/jobframework/interface.go Show resolved Hide resolved
pkg/util/priority/priority.go Outdated Show resolved Hide resolved
pkg/util/priority/priority.go Show resolved Hide resolved
pkg/util/priority/priority_test.go Outdated Show resolved Hide resolved
@tenzen-y
Copy link
Member

tenzen-y commented Sep 7, 2023

Sorry for the late. I will review this PR today.

@Gekko0114
Copy link
Member Author

Sorry for the late. I will review this PR today.

Np, thank you so much!

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

I left a comment for the first pass. I will review this PR again once you address @alculquicondor's comments regarding to immutable priorityClass.

apis/kueue/v1beta1/workloadpriorityclass_types.go Outdated Show resolved Hide resolved
apis/kueue/v1beta1/workloadpriorityclass_types.go Outdated Show resolved Hide resolved
apis/kueue/v1beta1/workloadpriorityclass_types.go Outdated Show resolved Hide resolved
pkg/constants/constants.go Outdated Show resolved Hide resolved
pkg/controller/core/workload_controller.go Outdated Show resolved Hide resolved
@tenzen-y
Copy link
Member

Hi @alculquicondor @tenzen-y,
Thank you so much for your review comments. I have made the requested changes. Could you review it again?
Additionally, I haven't written tests for preemption and the queue. Should I write tests for them as well?

I'm ok with not adding teets for the scheduler and preemptor since they depend only on priority values and priorityClassSources don't directly affect them.

WDYT? @alculquicondor

However, expanding integration tests for the job with the scheduler might be worth it.

var _ = ginkgo.Describe("Job controller interacting with scheduler", ginkgo.Ordered, ginkgo.ContinueOnFailure, func() {

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 15, 2023
@Gekko0114 Gekko0114 force-pushed the priority branch 4 times, most recently from ec6c88c to 71f02a0 Compare September 17, 2023 05:50
@Gekko0114
Copy link
Member Author

Hi @alculquicondor , @tenzen-y ,

I've fixed all comments and added e2e and integration test cases. Could you review it again?

Copy link
Contributor

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

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

Looking good overall.
I'll leave the final say to @tenzen-y.

apis/kueue/v1beta1/workload_types.go Outdated Show resolved Hide resolved
keps/973-workload-priority/README.md Outdated Show resolved Hide resolved
pkg/controller/jobframework/interface.go Outdated Show resolved Hide resolved
pkg/controller/jobframework/validation.go Show resolved Hide resolved
pkg/util/testing/wrappers.go Outdated Show resolved Hide resolved
Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

@Gekko0114 Otherwise LGTM
Could you open a PR to add documentation for WorkloadPriorityClass?

pkg/util/testing/wrappers.go Outdated Show resolved Hide resolved
test/integration/webhook/workload_test.go Outdated Show resolved Hide resolved
test/integration/webhook/workload_test.go Outdated Show resolved Hide resolved
@tenzen-y
Copy link
Member

Also, it would be better to squash all commits into one to avoid a huge commit message.

@Gekko0114
Copy link
Member Author

Hi @tenzen-y , @alculquicondor

Thank you so much for your detailed review! I've learned a lot from this PR.
I've fixed all comments, could you review it again?

Could you open a PR to add documentation for WorkloadPriorityClass?

Sure, do you mean I should add docs under here ?

@tenzen-y
Copy link
Member

Could you open a PR to add documentation for WorkloadPriorityClass?

Sure, do you mean I should add docs under here ?

Yes.

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

@Gekko0114 Thank you for the hard work! I am really looking forward to this new feature :)

/lgtm
/approve

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

LGTM label has been added.

Git tree hash: 92c89dd9222d35070d9f6595565cac6ae742b070

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Gekko0114, tenzen-y

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 24, 2023
@k8s-ci-robot k8s-ci-robot merged commit 4aea01d into kubernetes-sigs:main Sep 24, 2023
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.5 milestone Sep 24, 2023
@Gekko0114 Gekko0114 deleted the priority branch September 24, 2023 13:32
PBundyra pushed a commit to PBundyra/kueue that referenced this pull request Sep 25, 2023
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workload priority
4 participants