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

[batch/job] Allow unsuspending a job with a parallelism equal or less then minimum. #3152

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

trasc
Copy link
Contributor

@trasc trasc commented Sep 27, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

[batch/job] Allow unsuspending a job with a parallelism equal or less then min.

The minimum can be reached in the usual partial admission operation. Values less then minimum can be reached in case of readmitting jobs which have marked a good part of their pods as reclaimable.

Which issue(s) this PR fixes:

Fixes #3140

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fix webook validation for batch/Job to allow partial admission of a Job to use all available resources.
It also fixes a scenario of partial re-admission when some of the Pods are already reclaimed.

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 27, 2024
@trasc
Copy link
Contributor Author

trasc commented Sep 27, 2024

/test all

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 27, 2024
Copy link

netlify bot commented Sep 27, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 74883ef
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/66f6bce9ef50ee0008e8792d

@trasc
Copy link
Contributor Author

trasc commented Sep 27, 2024

/test all

@trasc
Copy link
Contributor Author

trasc commented Sep 27, 2024

/test pull-kueue-test-integration-main

… then min.

The minimum can be reached in the usual partial admission operation.
Values less then minimum can be reached in case of readmitting jobs
which have marked a good part of their pods as reclaimable.
@trasc
Copy link
Contributor Author

trasc commented Sep 27, 2024

/test pull-kueue-test-integration-main

@trasc trasc marked this pull request as ready for review September 27, 2024 14:53
@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 27, 2024
Copy link
Contributor

@mimowo mimowo left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
Thanks!

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

LGTM label has been added.

Git tree hash: 01b5e92657b78d46473b01c225c59ab5f23dd8fc

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mimowo, trasc

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 30, 2024
@mimowo
Copy link
Contributor

mimowo commented Sep 30, 2024

/release-note-edit

Fix webook validation for batch/Job to allow partial admission of a Job to use all available resources.
It also fixes a scenario of partial re-admission when some of the Pods are already reclaimed.

I think it better captures the fix from the end-user perspective.

@k8s-ci-robot k8s-ci-robot merged commit 3e3f45d into kubernetes-sigs:main Sep 30, 2024
15 of 16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.9 milestone Sep 30, 2024
@trasc trasc deleted the job-minPar-range branch September 30, 2024 12:29
@tenzen-y
Copy link
Member

tenzen-y commented Oct 8, 2024

It seems that there is this bug in the release-0.8 as well:

/cherry-pick release-0.8

@k8s-infra-cherrypick-robot
Copy link
Contributor

@tenzen-y: #3152 failed to apply on top of branch "release-0.8":

Applying: Allow unsuspending a job with a parallelism equal or less then min.
Using index info to reconstruct a base tree...
M	pkg/controller/jobs/job/job_webhook_test.go
A	test/integration/webhook/jobs/job_webhook_test.go
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): test/integration/webhook/jobs/job_webhook_test.go deleted in HEAD and modified in Allow unsuspending a job with a parallelism equal or less then min.. Version Allow unsuspending a job with a parallelism equal or less then min. of test/integration/webhook/jobs/job_webhook_test.go left in tree.
Auto-merging pkg/controller/jobs/job/job_webhook_test.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Allow unsuspending a job with a parallelism equal or less then min.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

It seems that there is this bug in the release-0.8 as well:

/cherry-pick release-0.8

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-sigs/prow repository.

@mimowo
Copy link
Contributor

mimowo commented Oct 8, 2024

Yeah there were a couple of bugs fixed for PartialAdmission. I think we need to cherry pick them all to make the feature work well , but I think it makes sense to do so

@tenzen-y
Copy link
Member

tenzen-y commented Oct 8, 2024

Yeah there were a couple of bugs fixed for PartialAdmission. I think we need to cherry pick them all to make the feature work well , but I think it makes sense to do so

That makes sense. I am seeking PR history, which includes PartialAdmission bug fixes.

@tenzen-y
Copy link
Member

tenzen-y commented Oct 8, 2024

Yeah there were a couple of bugs fixed for PartialAdmission. I think we need to cherry pick them all to make the feature work well , but I think it makes sense to do so

That makes sense. I am seeking PR history, which includes PartialAdmission bug fixes.

After I summarize all PRs at #3197, let's cherry-pick those to release 0.8.

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/bug Categorizes issue or PR as related to a bug. 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PartialAdmission] Job remains suspended when admitted using partial-admission
5 participants