⚠️ Fakeclient: Remove support for objects with pointer meta#3228
⚠️ Fakeclient: Remove support for objects with pointer meta#3228k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman 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 |
This change removes supports for objects that have type or object meta defined as pointer. This is because the `FieldManagedObjectTracker` needed for support of SSA in the fakeclient can not support it, as it has a lot of places where it unconditionally accesses these fields using reflect, which will cause panics.
f20e2fe to
06ac559
Compare
|
Do we have any idea of the use case for this? When would someone be deliberately using pointers here? Any scope of who we might break and how this might break them? |
I think its pretty uncommon and I think the main/only reason this might happen is when using gogo protobuf generation. It also didn't work at all until ~2 years ago: #2633 |
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: 45206b294cd752c37b711051e3f5ea377e2f9069 |
|
/lgtm |
This change removes supports for objects that have type or object meta defined as pointer.
This is because the
FieldManagedObjectTrackerneeded for support of SSA in the fakeclient can not support it, as it has a lot of places where it unconditionally accesses these fields using reflect, which will cause panics.