-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Remove TypeMeta declaration from the implementation of the objects #1462
Conversation
Hi @camilamacedo86. Thanks for your PR. I'm waiting for a operator-framework or openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
bb623a1
to
84cfd75
Compare
c/c @lilic @shawn-hurley |
003b5f2
to
3a2201b
Compare
a57e1d5
to
ec9079c
Compare
/ok-to-test |
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.
I think it makes sense to clean this up, Thanks!
ec9079c
to
473fb54
Compare
015ad42
to
177dad9
Compare
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.
LGTM
177dad9
to
50fcfc0
Compare
Thanks for all your contributions @camilamacedo86! 🎉 |
Description of the change:
Note that the TypeMeta struct and its values are automatically filled when an object is initialized in this way is unnecessary to add this values and indeed shows a not good practice at all since the dev can add wrong values which will cause issues as for example not allow the client GET the object.
Following an example which could cause error just to example this scenario.
Following an example of the issue faced, it is because of the
TypeMeta.APIVersion
informed is invalid for the resource object schema. It is not recommended declared theTypeMeta
since it will be implicitly generated.Motivation for the change:
Face issues like the above example because of this unnecessary declaration.