Skip to content

Comments

[release-0.23] 🐛 Fakeclient: Fix status apply if existing object has managedFields set#3437

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:release-0.23from
k8s-infra-cherrypick-robot:cherry-pick-3430-to-release-0.23
Jan 26, 2026
Merged

[release-0.23] 🐛 Fakeclient: Fix status apply if existing object has managedFields set#3437
k8s-ci-robot merged 1 commit intokubernetes-sigs:release-0.23from
k8s-infra-cherrypick-robot:cherry-pick-3430-to-release-0.23

Conversation

@k8s-infra-cherrypick-robot

This is an automated cherry-pick of #3430

/assign alvaroaleman

…s set

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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 26, 2026
@sbueringer
Copy link
Member

/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: c17fb33fb17b27e94d5b6877a634aca16bea9077

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: k8s-infra-cherrypick-robot, 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 26, 2026
@k8s-ci-robot k8s-ci-robot merged commit f52bbb8 into kubernetes-sigs:release-0.23 Jan 26, 2026
9 checks passed
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.

4 participants