-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
list_api_service: ValueError: Invalid value for service
, must not be None
#1174
Comments
I was able to reproduce it locally. |
@clausa20 I've started looking into it, and for now I have workaround on how to make this work without failing. kubernetes.config.load_kube_config()
api_registration_api = kubernetes.client.ApiregistrationV1Api()
response = api_registration_api.list_api_service(_preload_content=False)
print(response.data) I'll keep looking into why the data serialization fails and figure out if this is an intended behavior or something that requires fixing and will act accordingly. But I hope that I was able to get you unblocked for now. |
@MoShitrit thanks for the workaround, it fits ok for me. Regards. |
Looks like this is another occurrence of kubernetes-client/gen#52 and has been fixed by kubernetes/kubernetes#85728 in Kubernetes 1.18. Kubernetes sometimes incorrectly restricts a field to be required but the apiserver may omits the field in real responses. These responses break the generated clients since the generated client-side validation expects the required field to exist. For now the workaround is either to avoid de-serializing the response so the client-side validation doesn't kick in, or to remove the client-side validation if you have access to your local module code. Once we cut a new release with the 1.18 openapi spec, the generated client won't expect the field to be required. |
* Gets raw data from Kubernetes and avoids OpenAPI deserialization which fails due to kubernetes-client/gen#52, even though [this fix](kubernetes/kubernetes#85728) exists, the Python Kubernetes library is still not compatible with it. More information at kubernetes-client/python#1174.
* Gets raw data from Kubernetes and avoids OpenAPI deserialization which fails due to kubernetes-client/gen#52, even though [this fix](kubernetes/kubernetes#85728) exists, the Python Kubernetes library is still not compatible with it. More information at kubernetes-client/python#1174.
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
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. |
Hello,
I try to get apiservice using in python doing:
but I get the following error:
ValueError: Invalid value for
service
, must not beNone
I have a AWS EKS 1.15 as Kubernetes Master.
Python 3.6.8.
python kubernetes client 10.0.0
Ubuntu 16.04.6 LTS
Update:
I've tested it with python kubernetes client 11.0.0 and I get the same error
The text was updated successfully, but these errors were encountered: