-
Notifications
You must be signed in to change notification settings - Fork 871
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
runtime.Object apiVersion/kind is empty #3288
Conversation
Just a question,will this change break compatibility? |
Good question. |
Signed-off-by: xigang <wangxigang2014@gmail.com>
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #3288 +/- ##
==========================================
- Coverage 49.40% 49.39% -0.02%
==========================================
Files 207 207
Lines 18499 18505 +6
==========================================
Hits 9140 9140
- Misses 8865 8869 +4
- Partials 494 496 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
cc @chaunceyjiang Do you have any other comments?
/lgtm
/lgtm |
@@ -74,7 +74,18 @@ func ClusterWideKeyFunc(obj interface{}) (ClusterWideKey, error) { | |||
return key, fmt.Errorf("object has no meta: %v", err) | |||
} | |||
|
|||
// When using a typed client, decoding to a versioned struct (not an internal API type), the apiVersion/kind |
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.
Is APIVersion/Kind information of runtime.Object
filled in when we using dynamic client?
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.
/approve
Thanks, @xigang and welcome to Karmada.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
When using a typed client, decoding to a versioned struct (not an internal API type), the apiVersion/kind information will be dropped. Therefore, the APIVersion/Kind information of runtime.Object needs to be verified.
See issue: kubernetes/kubernetes#80609
Which issue(s) this PR fixes:
Fixes #3275
Special notes for your reviewer:
@RainbowMango @whitewindmills
Does this PR introduce a user-facing change?: