Skip to content

Comments

🐛 Fakeclient: Fix status apply if existing object has managedFields set#3430

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
alvaroaleman:fakestatusapplymf
Jan 26, 2026
Merged

🐛 Fakeclient: Fix status apply if existing object has managedFields set#3430
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
alvaroaleman:fakestatusapplymf

Conversation

@alvaroaleman
Copy link
Member

The tracker we use in the fakeclient doesn't support status operations, so we implemented them by copying everything but status and ResourceVersion from the existing object.

This meant that we copied the existing objects managedFields and that in turn made the managedFieldsObjectTracker error out on Apply with an metadata.managedFields must be nil.

Stop copying the managedFields in status updates.

Fixes #3423

The tracker we use in the fakeclient doesn't support status operations,
so we implemented them by copying everything but status and
ResourceVersion from the existing object.

This meant that we copied the existing objects managedFields and that in
turn made the `managedFieldsObjectTracker` error out on Apply with an
`metadata.managedFields must be nil`.

Stop copying the managedFields in status updates.
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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. labels Jan 24, 2026
@alvaroaleman
Copy link
Member Author

/cherrypick release-0.23

@k8s-infra-cherrypick-robot

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

Details

In response to this:

/cherrypick release-0.23

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.

@sbueringer
Copy link
Member

Thx!

/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 26, 2026
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: 96e825c1c6514317ac66bf76100599a2029eb793

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, 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:
  • OWNERS [alvaroaleman,sbueringer]

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 merged commit 83b689c into kubernetes-sigs:main Jan 26, 2026
11 checks passed
@k8s-infra-cherrypick-robot

@alvaroaleman: new pull request created: #3437

Details

In response to this:

/cherrypick release-0.23

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

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.

Fake client on version 0.23.0 fails to SSA Apply status after a finalizer is set

4 participants