Skip to content

Apply Provisioned condition with SSA#9842

Open
norbertcyran wants to merge 1 commit into
kubernetes:masterfrom
norbertcyran:pr-patch-conditions
Open

Apply Provisioned condition with SSA#9842
norbertcyran wants to merge 1 commit into
kubernetes:masterfrom
norbertcyran:pr-patch-conditions

Conversation

@norbertcyran

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

We noticed a very frequent conflict when adding a Provisioned condition to the ProvisioningRequest. That usually happens in best-effort-atomic PRs, where CA adds Accepted and then Provisioned conditions in a very quick succession. The informer cache does not catch up with the first update, and therefore a conflict is detected during the second update. SSA fixes that, as it allows to update a single condition without a risk of conflict. This solution is preferred over a retry loop, since the API calls run synchronously in the CA main loop. Strategic merge patch could not be used, since it's not supported with CRDs. JSON merge patch replaces the entire conditions list. That leaves SSA an only viable solution. Note: that fixes only the most frequently detected race condition. Eventually, all PR condition updates should be migrated to SSA.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

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


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area Indicates that a PR should not merge because it lacks an area label. labels Jun 19, 2026
@k8s-ci-robot k8s-ci-robot requested review from mtrqq and x13n June 19, 2026 16:10
@k8s-ci-robot k8s-ci-robot added area/cluster-autoscaler Issues or PRs related to the Cluster Autoscaler component size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-area Indicates that a PR should not merge because it lacks an area label. labels Jun 19, 2026
We noticed a very frequent conflict when adding a Provisioned condition
to the ProvisioningRequest. That usually happens in best-effort-atomic
PRs, where CA adds Accepted and then Provisioned conditions in a very
quick succession. The informer cache does not catch up with the first
update, and therefore a conflict is detected during the second update.
SSA fixes that, as it allows to update a single condition without a risk
 of conflict. This solution is preferred over a retry loop, since the
 API calls run synchronously in the CA main loop. Strategic merge patch
 could not be used, since it's not supported with CRDs. JSON merge patch
  replaces the entire conditions list. That leaves SSA an only viable
  solution. Note: that fixes only the most frequently detected race
  condition. Eventually, all PR condition updates should be migrated to
  SSA.
@norbertcyran norbertcyran force-pushed the pr-patch-conditions branch from 9ce7389 to d453489 Compare June 19, 2026 16:14
@jackfrancis

Copy link
Copy Markdown
Contributor

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 19, 2026

@jackfrancis jackfrancis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm
/approve

/hold
/assign @aleksandra-malinowska @towca

to let others take a look

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 19, 2026
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 19, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jackfrancis, norbertcyran

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

The pull request process is described 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 19, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

@norbertcyran: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-autoscaling-e2e-gci-gce-ca-test d453489 link false /test pull-autoscaling-e2e-gci-gce-ca-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

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. area/cluster-autoscaler Issues or PRs related to the Cluster Autoscaler component cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. 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-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants