Skip to content

Conversation

@norbertcyran
Copy link
Contributor

@norbertcyran norbertcyran commented Jan 26, 2026

What type of PR is this?

/kind bug

What this PR does / why we need it:

When setting buffer condition (ReadyForProvisioning or Provisioning), 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 use meta.SetStatusCondition function 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 between common and testutil package. I mitigated that by moving out constants from common to the top-level capacitybuffer package (as a side note, I believe that neither testutil nor common deserve their own packages, but let's leave that for now)

Does this PR introduce a user-facing change?

Fixed overwriting CapacityBuffer conditions and fixed typos in condition messages and reasons.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@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. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area labels Jan 26, 2026
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: norbertcyran
Once this PR has been reviewed and has the lgtm label, please assign feiskyer for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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 area/cluster-autoscaler needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 26, 2026
@k8s-ci-robot
Copy link
Contributor

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 /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.

Details

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.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/needs-area labels Jan 26, 2026
@norbertcyran norbertcyran force-pushed the fix-overriding-buffers-conditions branch 2 times, most recently from dc24df1 to bf92406 Compare January 27, 2026 09:56
@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 do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jan 27, 2026
@norbertcyran norbertcyran force-pushed the fix-overriding-buffers-conditions branch from bf92406 to c4d0e8e Compare January 27, 2026 10:20
@norbertcyran norbertcyran marked this pull request as ready for review January 27, 2026 10:21
@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 27, 2026
@k8s-ci-robot k8s-ci-robot requested a review from feiskyer January 27, 2026 10:21
@norbertcyran
Copy link
Contributor Author

/assign abdelrahman882 BigDarkClown

LastTransitionTime: metav1.Time{Time: time.Now()},
}
buffer.Status.Conditions = []metav1.Condition{notReadyCondition}
if buffer.Status.Conditions == nil {
Copy link
Contributor

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?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 4, 2026
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Details

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cluster-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants