python
python copied to clipboard
connect_get_namespaced_service_proxy_with_path messes up response
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
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?
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"]
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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: 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/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closedYou 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.