-
Notifications
You must be signed in to change notification settings - Fork 184
Make duck-typing checking in serialize_body
method more restrictive
#241
Make duck-typing checking in serialize_body
method more restrictive
#241
Conversation
Welcome @piglei! |
/assign @yliaog |
/lgtm /assign @fabianvf |
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, needs rebase though
/approve |
Rebased with upstream/master. |
PR refreshed. |
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. |
please squash the commits |
fd876b7
to
66a45cd
Compare
Done |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabianvf, piglei, yliaog 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 |
@piglei just needs the release note and it should be good to go |
Thanks for reminding me, the release note was now added. |
The
body
parameter inDynamicClient
's most methods currently accepts both dict type andResourceInstance
type. This was achieved by callingserialize_body()
before mading any requests.But in current implementation, the duck-typing style checking in
serialize_body
was kind of meaning-less---ResourceInstance
type has overwritten it's__getattr__
method, so basically it's instances can pass everyhasattr(...)
check.This PR makes the checking in
serialize_body()
method more restrictive and also add some related unit tests.Release Note: