-
Notifications
You must be signed in to change notification settings - Fork 78
Drop the LKE ACL addresses field when its value is null
#514
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
Conversation
| result = self.client.post( | ||
| "/lke/clusters", | ||
| data=_flatten_request_body_recursive(drop_null_keys(params)), | ||
| data=drop_null_keys(_flatten_request_body_recursive(params)), |
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.
drop_null_keys(...) needed to be moved outside of the _flatten_request_body_recursive(...) call because it doesn't have handling for JSONObjects.
jriddle-linode
left a comment
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.
Working locally LGTM
ezilber-akamai
left a comment
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'm consistently getting some test failures. Could be related to the ACL API change that got released yesterday, but I'm not sure.
FAILED test/integration/models/lke/test_lke.py::test_lke_cluster_acl - AssertionError: assert [] == ['10.0.0.2/32']
FAILED test/integration/models/lke/test_lke.py::test_lke_cluster_update_acl_null_addresses - AssertionError: assert [] == ['10.0.0.1/32']
FAILED test/integration/models/lke/test_lke.py::test_lke_cluster_disable_acl - assert False
Looks like it was indeed related to the API Change, thanks for the heads up! |
08f3091 to
7fce67c
Compare
ezilber-akamai
left a comment
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.
Passing locally!
📝 Description
This pull request updates the LKE cluster create and control plane ACL update methods to drop the
addressesfield if its value is null. This is necessary because an explicit null value is rejected by the API.✔️ How to Test
The following test steps assume you have pulled down this PR locally.
Unit Testing
Integration Testing
Manual Testing