Skip to content
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

kubernetes.client.apis.apps_v1beta1_api.AppsV1beta1Api.get_api_resources() crashes on OpenShift 3.6 because of deserialization failure #464

Closed
ceridwen opened this issue Feb 26, 2018 · 7 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@ceridwen
Copy link

This is the same fundamental issue as #394 and #418, deserialization fails because the JSON returned by the OpenShift API server doesn't conform to the required fields the client expects. In this case, the model is APIResource and the field is SingularName.

  File "/Users/user/test_automation/test_automation/kubernetes_.py", line 55, in get_resource_info
    api_group = api.get_api_resources()
  File "/Users/user/virtualenvs/client4.0/lib/python3.6/site-packages/kubernetes/client/apis/apps_v1beta1_api.py", line 1264, in get_api_resources
    (data) = self.get_api_resources_with_http_info(**kwargs)
  File "/Users/user/virtualenvs/client4.0/lib/python3.6/site-packages/kubernetes/client/apis/apps_v1beta1_api.py", line 1333, in get_api_resources_with_http_info
    collection_formats=collection_formats)
  File "/Users/user/virtualenvs/client4.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 321, in call_api
    _return_http_data_only, collection_formats, _preload_content, _request_timeout)
  File "/Users/user/virtualenvs/client4.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 163, in __call_api
    return_data = self.deserialize(response_data, response_type)
  File "/Users/user/virtualenvs/client4.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 236, in deserialize
    return self.__deserialize(data, response_type)
  File "/Users/user/virtualenvs/client4.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 276, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/Users/user/virtualenvs/client4.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 620, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/Users/user/virtualenvs/client4.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 254, in __deserialize
    for sub_data in data]
  File "/Users/user/virtualenvs/client4.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 254, in <listcomp>
    for sub_data in data]
  File "/Users/user/virtualenvs/client4.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 276, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/Users/user/virtualenvs/client4.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 622, in __deserialize_model
    instance = klass(**kwargs)
  File "/Users/user/virtualenvs/client4.0/lib/python3.6/site-packages/kubernetes/client/models/v1_api_resource.py", line 82, in __init__
    self.singular_name = singular_name
  File "/Users/user/virtualenvs/client4.0/lib/python3.6/site-packages/kubernetes/client/models/v1_api_resource.py", line 252, in singular_name
    raise ValueError("Invalid value for `singular_name`, must not be `None`")

This is OpenShift client #139 moved upstream.

@fabianvf
Copy link
Contributor

I am seeing this as well, haven't found a great way around it other than passing _preload_content=False (api.get_api_resources(_preload_content=False)) and manually parsing the response.data

@chouseknecht
Copy link

Here's the issue mentioned by @fabianvf as reported by an Ansible user: ansible/ansible#36939

@chouseknecht
Copy link

chouseknecht commented Mar 2, 2018

Hit the same issue with TemplateInstance. See ansible/ansible#36900 for details. It complians that raw must not be None in kubernetes/client/models/runtime_raw_extension.py

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 22, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 22, 2019
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

5 participants