python icon indicating copy to clipboard operation
python copied to clipboard

connect_get_namespaced_service_proxy_with_path messes up response

Open david0 opened this issue 1 year ago • 4 comments

What happened (please include outputs or screenshots):

Im running connect_get_namespaced_service_proxy_with_path(name, namespace, path="actuator") to get JSON data from my webservice.

The result is a JSON list: ["foo", "bar"]

but the function returns ['foo', 'bar']

What you expected to happen: The function to return ["foo", "bar"] or to return the list or a bytearray.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

It looks like the deserialisation messes it up. It can be worked around by passing _preload_content=False

Environment:

  • Kubernetes version (kubectl version): v1.25.13
  • OS (e.g., MacOS 10.13.6): MacOS 13.6
  • Python version (python --version): Python 3.9.17
  • Python client version (pip list | grep kubernetes): 28.1.0

david0 avatar Dec 05 '23 10:12 david0

The result is a JSON list: ["foo", "bar"]

but the function returns ['foo', 'bar']

Could you elaborate what's the difference between the two responses?

roycaihw avatar Feb 12 '24 17:02 roycaihw

The webservice that I'm trying to connect will return a JSON list of strings (with doublequotes): ["foo", "bar"]

connect_get_namespaced_service_proxy_with_path(name, namespace, path="actuator") will return a str with the value ['foo', 'bar'] , which is very unexpected for me. I mean it looks on first sight like a valid python list, but its returned as a str(!) instead of list.

If the return value would be a list, it would be fine. But I guess intuitively everyone would expect that it would return the raw, original response string ["foo", "bar"]

david0 avatar Feb 12 '24 19:02 david0

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar May 12 '24 20:05 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jun 11 '24 20:06 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Jul 11 '24 21:07 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

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-sigs/prow repository.

k8s-ci-robot avatar Jul 11 '24 21:07 k8s-ci-robot