-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Fix overriding buffers conditions #9128
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
base: master
Are you sure you want to change the base?
Fix overriding buffers conditions #9128
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: norbertcyran The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @norbertcyran. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
dc24df1 to
bf92406
Compare
bf92406 to
c4d0e8e
Compare
|
/assign abdelrahman882 BigDarkClown |
| LastTransitionTime: metav1.Time{Time: time.Now()}, | ||
| } | ||
| buffer.Status.Conditions = []metav1.Condition{notReadyCondition} | ||
| if buffer.Status.Conditions == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far a side effect of the bug you're fixing was that when buffer was not ready for provisioning, we also cleared Provisioning flag. Can you double check that having ReadyForProvisioning=False and Provisioning=True won't trigger pod injection?
|
PR needs rebase. DetailsInstructions 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. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
When setting buffer condition (
ReadyForProvisioningorProvisioning), we overwrite any other condition already set. We should only add/update the condition we're working on. In this PR, instead of overwriting buffer's conditions, we will usemeta.SetStatusConditionfunction from apimachinery that adds or updates the condition. Additionally, I fixed some typos in the conditions.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
I had some issues with circular dependencies when I wrote tests in
common_test.go. There was a circular dependency betweencommonandtestutilpackage. I mitigated that by moving out constants fromcommonto the top-levelcapacitybufferpackage (as a side note, I believe that neithertestutilnorcommondeserve their own packages, but let's leave that for now)Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: