Skip to content

Unable to deserialize models with attributes of type RuntimeRawExtension #461

Open

Description

@fabianvf

Minimal example for ControllerRevision (requires an active kubernetes cluster with working kubeconfig):

from kubernetes import client, config

config.load_kube_config()
apps_v1beta1_api = client.AppsV1beta1Api()
controller_revisions = apps_v1beta1_api.list_controller_revision_for_all_namespaces()

Issue seems to be here: https://github.com/kubernetes-client/python/blob/master/kubernetes/client/api_client.py#L617

 if data is not None \
                   and klass.attribute_map[attr] in data \  # <-- here
                   and isinstance(data, (list, dict)):
    value = data[klass.attribute_map[attr]]
    kwargs[attr] = self.__deserialize(value, attr_type)

where it is looking for the 'Raw' attribute in data, but data is a freeform JSON object with no specific 'Raw' key. Because this conditional fails, nothing is ever added to kwargs, and RuntimeRawExtension is initialized without the required raw value.

Activity

  1. fabianvf commented on Feb 27, 2018

    @fabianvf
    ContributorAuthor

    Here's a patch to the openshift-restclient-python that at least partially works around this issue.
    https://github.com/openshift/openshift-restclient-python/pull/159/files

  2. fejta-bot commented on Apr 22, 2019

    @fejta-bot

    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

  3. added
    lifecycle/stale
    on Apr 22, 2019
  4. fejta-bot commented on May 22, 2019

    @fejta-bot

    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

  5. added
    lifecycle/rotten
    and removed
    lifecycle/stale
    on May 22, 2019
  6. fejta-bot commented on Jun 22, 2019

    @fejta-bot

    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

  7. k8s-ci-robot commented on Jun 22, 2019

    @k8s-ci-robot
    Contributor

    @fejta-bot: Closing this issue.

    Details

    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.

  8. alfredkrohmer commented on Nov 7, 2019

    @alfredkrohmer

    /reopen

    This is still broken. Can we port the fix from openshift to this library?

  9. k8s-ci-robot commented on Nov 7, 2019

    @k8s-ci-robot
    Contributor

    @devkid: You can't reopen an issue/PR unless you authored it or you are a collaborator.

    Details

    In response to this:

    /reopen

    This is still broken. Can we port the fix from openshift to this library?

    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.

  10. fabianvf commented on Nov 12, 2019

    @fabianvf
    ContributorAuthor

    /reopen

  11. k8s-ci-robot commented on Nov 12, 2019

    @k8s-ci-robot
    Contributor

    @fabianvf: Reopened this issue.

    Details

    In response to this:

    /reopen

    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.

  12. fabianvf commented on Nov 22, 2019

    @fabianvf
    ContributorAuthor

    /remove-lifecycle rotten

  13. removed
    lifecycle/rotten
    on Nov 22, 2019
  14. fejta-bot commented on Feb 20, 2020

    @fejta-bot

    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

  15. added
    lifecycle/stale
    on Feb 20, 2020
  16. fejta-bot commented on Mar 21, 2020

    @fejta-bot

    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

  17. added
    lifecycle/rotten
    and removed
    lifecycle/stale
    on Mar 21, 2020
  18. palnabarun commented on Mar 25, 2020

    @palnabarun
    Member

    /remove-lifecycle rotten

  19. removed
    lifecycle/rotten
    on Mar 25, 2020
  20. palnabarun commented on Mar 25, 2020

    @palnabarun
    Member

    /lifecycle frozen

  21. added
    lifecycle/frozen
    on Mar 25, 2020
  22. whypro commented on Apr 8, 2020

    @whypro

    Has it been fixed in latest release? If not, I would like to cherrypick the patch and fix this. :)

  23. brutus333 commented on May 28, 2020

    @brutus333

    I hit the same bug while trying to get the pods owned by a daemonset without looking at all pods in a namespace. Any chance to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/frozen

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions