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

Preemption within ClusterQueue and cohort #514

Merged
merged 2 commits into from
Jan 30, 2023

Conversation

alculquicondor
Copy link
Contributor

@alculquicondor alculquicondor commented Jan 12, 2023

What type of PR is this?

/kind feature

/kind api-change

What this PR does / why we need it:

Implements https://github.com/kubernetes-sigs/kueue/tree/05da320/keps/83-workload-preemption

Which issue(s) this PR fixes:

Fixes #83

Special notes for your reviewer:

@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. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Jan 12, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor

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 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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 12, 2023
@alculquicondor alculquicondor force-pushed the preemption branch 6 times, most recently from 59bba33 to 7c68bdc Compare January 18, 2023 20:52
@alculquicondor alculquicondor changed the title WIP: Preemption within ClusterQueue and cohort Preemption within ClusterQueue and cohort Jan 18, 2023
@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 Jan 18, 2023
@alculquicondor
Copy link
Contributor Author

/assign @ahg-g

Copy link
Contributor

@ahg-g ahg-g left a comment

Choose a reason for hiding this comment

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

The suggestions for optimizations can be done on followup PRs.

"sigs.k8s.io/kueue/pkg/workload"
)

const parallelPreemptions = 8
Copy link
Member

Choose a reason for hiding this comment

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

Do you have reasons why this is hardcoded?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just simplicity. We can add a configuration option later. But it might just be a general parallelism parameter, like in scheduler.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good.

Copy link
Contributor

@ahg-g ahg-g left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold

for one nit

@@ -38,13 +38,16 @@ const (
isNegativeErrorMsg string = `must be greater than or equal to 0`
)

type ClusterQueueWebhook struct{}
type ClusterQueueWebhook struct {
scheme *runtime.Scheme
Copy link
Contributor

Choose a reason for hiding this comment

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

where is this used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Left over from another approach I tried. Removed

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Jan 28, 2023
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 30, 2023
@alculquicondor
Copy link
Contributor Author

squashed into 2 commits

@alculquicondor
Copy link
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 30, 2023
With validation and defaulting

Change-Id: Ifb618c6e0c0bbf7c8b721b30a764c5a62a8bde22
@ahg-g
Copy link
Contributor

ahg-g commented Jan 30, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 30, 2023
@k8s-ci-robot k8s-ci-robot merged commit c2d2dc6 into kubernetes-sigs:main Jan 30, 2023
This was referenced Feb 9, 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/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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. 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.

Support for workload preemption
5 participants