Skip to content

Conversation

@sbueringer
Copy link
Member

@sbueringer sbueringer commented Dec 18, 2025

The fake client has a bug that if Apply is used with Unstructured and without setting resourceVersion it returns the following conflict error:

failed to generate CanUpdateMachine request: server side apply dry-run failed for desired Machine: failed to apply Machine: Operation cannot be fulfilled on machines.cluster.x-k8s.io "machine-to-in-place-update": object was modified

This PR fixes it by treating Apply the same way as Patch

Signed-off-by: Stefan Büringer buringerst@vmware.com

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 18, 2025
@sbueringer sbueringer changed the title 🐛 Fix fake client Apply with Unstructured ApplyConfiguration and resourceVersion unset [WIP] 🐛 Fix fake client Apply with Unstructured ApplyConfiguration and resourceVersion unset Dec 18, 2025
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 18, 2025
@sbueringer sbueringer force-pushed the pr-fix-fake-client-ssa branch from 48b955d to 174863b Compare December 18, 2025 15:49
@sbueringer sbueringer changed the title [WIP] 🐛 Fix fake client Apply with Unstructured ApplyConfiguration and resourceVersion unset 🐛 Fix fake client Apply with Unstructured ApplyConfiguration and resourceVersion unset Dec 18, 2025
@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 Dec 18, 2025
resourceVersion unset

Signed-off-by: Stefan Büringer buringerst@vmware.com
@sbueringer sbueringer force-pushed the pr-fix-fake-client-ssa branch from 174863b to 7fb375a Compare December 19, 2025 07:05
@sbueringer
Copy link
Member Author

/assign @fabriziopandini

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

Changes looks good to me
Thanks for the extensive code coverage
/lgtm

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

LGTM label has been added.

DetailsGit tree hash: 3e31c1eccbdf1d81dca9742e53aa4a3df43f0684

@k8s-ci-robot k8s-ci-robot merged commit f28fd58 into kubernetes-sigs:main Dec 19, 2025
9 checks passed
@sbueringer sbueringer deleted the pr-fix-fake-client-ssa branch December 19, 2025 10:19
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

3 participants