🐛 Fakeclient: Fix status apply if existing object has managedFields set#3430
Conversation
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.
|
/cherrypick release-0.23 |
|
@alvaroaleman: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
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. |
|
Thx! /lgtm |
|
LGTM label has been added. DetailsGit tree hash: 96e825c1c6514317ac66bf76100599a2029eb793 |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@alvaroaleman: new pull request created: #3437 DetailsIn response to this:
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. |
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
managedFieldsObjectTrackererror out on Apply with anmetadata.managedFields must be nil.Stop copying the managedFields in status updates.
Fixes #3423