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

Do not (re)create ProvReq is the state of admission check is Ready #1617

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

mimowo
Copy link
Contributor

@mimowo mimowo commented Jan 19, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #1605

Special notes for your reviewer:

I tested this in a loop and already >2500 repeats passed, which makes me confident the test is fixed.

A potential drawback scenario is when the check is flipped to Ready, but the workload awaits long (>10min) for other checks, if in the meantime the ProvReq is manually deleted then it will not be recreated. As a consequence the nodes might be collected by CA (Cluster Autoscaler) before the workload is admitted. Not sure we want to support the scenario.

Does this PR introduce a user-facing change?

Do not (re)create ProvReq if the state of admission check is Ready

@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. labels Jan 19, 2024
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 19, 2024
Copy link

netlify bot commented Jan 19, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit f7b8396
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/65aa420012dea40008ac61f5

@mimowo
Copy link
Contributor Author

mimowo commented Jan 19, 2024

/test-all

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 19, 2024
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 19, 2024
@mimowo mimowo marked this pull request as ready for review January 19, 2024 09:36
@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 19, 2024
@mimowo
Copy link
Contributor Author

mimowo commented Jan 19, 2024

/assign @alculquicondor
This solves the flake, but potentially exposes us to another drawback scenario (more in the reviewer notes). PTAL.

@alculquicondor
Copy link
Contributor

That behavior is independent of whether the ProvReq is deleted, so we likely need a different solution for that.

For example, we could have an additional API field in the ProvisioningRequestConfig that can tell us that a fulfilled ProvReq could expire after a certain time. And then we can flip the admissionCheck status in the Workload based on it.

@alculquicondor
Copy link
Contributor

/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 Jan 19, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 5ecb9291344342d5cfda71d1d233fe5e9a011b79

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, 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

@alculquicondor
Copy link
Contributor

/cherry-pick

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 19, 2024
@alculquicondor
Copy link
Contributor

oops

/cherry-pick release-0.5

@k8s-infra-cherrypick-robot

@alculquicondor: once the present PR merges, I will cherry-pick it on top of release-0.5 in a new PR and assign it to you.

In response to this:

oops

/cherry-pick release-0.5

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 merged commit 12d4573 into kubernetes-sigs:main Jan 19, 2024
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.6 milestone Jan 19, 2024
@k8s-infra-cherrypick-robot

@alculquicondor: #1617 failed to apply on top of branch "release-0.5":

Applying: Do not (re)create ProvReq is the state of admission check is Ready
Using index info to reconstruct a base tree...
M	pkg/controller/admissionchecks/provisioning/controller.go
M	pkg/controller/admissionchecks/provisioning/controller_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/controller/admissionchecks/provisioning/controller_test.go
CONFLICT (content): Merge conflict in pkg/controller/admissionchecks/provisioning/controller_test.go
Auto-merging pkg/controller/admissionchecks/provisioning/controller.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 Do not (re)create ProvReq is the state of admission check is Ready
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:

oops

/cherry-pick release-0.5

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.

@mimowo mimowo deleted the flaky-provreq-test branch January 19, 2024 15:33
@mimowo
Copy link
Contributor Author

mimowo commented Jan 19, 2024

It seems the cherry pick failed, I can l prepare manually the pr

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
4 participants