-
Notifications
You must be signed in to change notification settings - Fork 38.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix round-trip of Unstructured.OwnerReferences #46683
Fix round-trip of Unstructured.OwnerReferences #46683
Conversation
Hi @ash2k. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with 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/test-infra repository. I understand the commands that are listed here. |
/sig api-machinery |
I'm not sure whether I've added tests to the right file - there is also |
setNestedField(ret, src.Kind, "kind") | ||
setNestedField(ret, src.Name, "name") | ||
setNestedField(ret, src.APIVersion, "apiVersion") | ||
setNestedField(ret, string(src.UID), "uid") | ||
setNestedField(ret, controllerPtr, "controller") | ||
setNestedField(ret, blockOwnerDeletionPtr, "blockOwnerDeletion") | ||
if src.Controller != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need comments here explaining how the marshalling leaves nil as missing, and otherwise as a bool, so this matches the "normal" marshalling.
comment about adding a comment that needs to be addressed. |
@k8s-bot ok to test |
@ash2k new process requires issues for bug fixes. Make an issue, link from your description, tag me, and I'll apply the necessary labels. |
Previously setOwnerReference was storing pointers but extractOwnerReference is expecting pointer fields as plain values. Fixes kubernetes#46817
55d65e8
to
427b8cd
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ash2k, deads2k Assign the PR to them by writing The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
must be the apimachinery tests. approved |
@ash2k: The following test(s) failed:
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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/test-infra repository. I understand the commands that are listed here. |
Automatic merge from submit-queue (batch tested with PRs 44883, 46836, 46765, 46683, 46050) |
/kind bug |
What this PR does / why we need it:
Previously
setOwnerReference()
was storing pointers butextractOwnerReference()
is expecting pointer fields as plain values so it cannot read those pointers. And hence you cannot read what you've just stored.Which issue this PR fixes
#46817
Special notes for your reviewer:
This is similar to #43346.
Release note: