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

Add validation and test for borrowingLimit when cohort is nil #1525

Merged
merged 5 commits into from
Dec 31, 2023

Conversation

B1F030
Copy link
Member

@B1F030 B1F030 commented Dec 28, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

When cohort is nil, borrowingLimit should be nil too.
After add a webhook validation, some tests failed:
integration-test
unit

Which issue(s) this PR fixes:

#1496
#1385

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add validation for clusterQueue: when cohort is empty, borrowingLimit must be nil.

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 28, 2023
Copy link

netlify bot commented Dec 28, 2023

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 2b9ca44
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/65919047c44d5b0008e49f30

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 28, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @B1F030. 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 the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 28, 2023
@B1F030
Copy link
Member Author

B1F030 commented Dec 28, 2023

/cc @kerthcet

@kerthcet
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 28, 2023
@B1F030 B1F030 changed the title Fix test for borrowingLimit when cohort is nil Add validation and test for borrowingLimit when cohort is nil Dec 28, 2023
B1F030 added a commit to B1F030/kueue that referenced this pull request Dec 28, 2023
Co-authored-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: B1F030 <646337422@qq.com>
@B1F030
Copy link
Member Author

B1F030 commented Dec 28, 2023

/remove-kind failing-test
/kind cleanup

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. labels Dec 28, 2023
Signed-off-by: B1F030 <646337422@qq.com>
@kerthcet
Copy link
Contributor

/remove-kind cleanup
/kind feature

As we're adding validations for borrowingLimit.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Dec 29, 2023
pkg/webhooks/clusterqueue_webhook.go Outdated Show resolved Hide resolved
pkg/webhooks/clusterqueue_webhook.go Outdated Show resolved Hide resolved
pkg/webhooks/clusterqueue_webhook_test.go Outdated Show resolved Hide resolved
pkg/webhooks/clusterqueue_webhook.go Outdated Show resolved Hide resolved
B1F030 and others added 3 commits December 29, 2023 11:21
Co-authored-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: B1F030 <646337422@qq.com>
Co-authored-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: B1F030 <646337422@qq.com>
Copy link
Contributor

@kerthcet kerthcet 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

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

LGTM label has been added.

Git tree hash: 3deb5efab63359f3a99f788255061d22c7217653

@kerthcet
Copy link
Contributor

Can you update the release note:

Add validation for clusterQueue: when cohort is empty, borrowingLimit must be nil.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Dec 29, 2023
@B1F030
Copy link
Member Author

B1F030 commented Dec 29, 2023

Can you update the release note:

Add validation for clusterQueue: when cohort is empty, borrowingLimit must be nil.

Done.

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.

Otherwise lgtm

pkg/webhooks/clusterqueue_webhook.go Outdated Show resolved Hide resolved
Co-authored-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: B1F030 <646337422@qq.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 31, 2023
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.

Thanks!
/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 Dec 31, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: B1F030, kerthcet, 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
Copy link
Contributor

LGTM label has been added.

Git tree hash: 045133f71b2d8fb89b06dc5b050f73ee1f5ef4b2

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 31, 2023
@k8s-ci-robot k8s-ci-robot merged commit 065451d into kubernetes-sigs:main Dec 31, 2023
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.6 milestone Dec 31, 2023
@B1F030 B1F030 deleted the test-borrowingLimit branch January 1, 2024 12:28
@alculquicondor
Copy link
Contributor

/kind api-change

@k8s-ci-robot k8s-ci-robot added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Feb 13, 2024
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. 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/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.

None yet

5 participants