Python: allow_watch_bookmarks does not work

Created on 8 Apr 2020  路  12Comments  路  Source: kubernetes-client/python

What happened (please include outputs or screenshots):
Kubernetes API response:

Response is not chunked. Header 'transfer-encoding: chunked' is missing.

What you expected to happen:
Python client should add transfer-encoding header, when allow_watch_bookmarks is True https://kubernetes.io/docs/reference/using-api/api-concepts/#watch-bookmarks

How to reproduce it (as minimally and precisely as possible):
Run watcher for any object list.

Anything else we need to know?:

Environment:

  • Kubernetes version (kubectl version): 1.17.0
  • OS (e.g., MacOS 10.13.6): Windows 10
  • Python version (python --version): 3.8
  • Python client version (pip list | grep kubernetes): 11.0.0
kinbug lifecyclrotten

All 12 comments

/assign @yliaog

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

/remove-lifecycle-state

transfer-encoding header is set at the server side, not at the client side, so it should not be added to python client library

@yliaog Thank you for reply. We have this header enabled on servers by default. These are headers from API request:

content-type: application/json
transfer-encoding: chunked
date: Mon, 20 Jul 2020 12:42:03 GMT

Maybe you know what the problem might be?

it is not obvious to me what might be the problem.
what if you 'GET' or 'LIST' a resource? if there is no problem there, what about 'WATCH' without allow_watch_bookmarks?

@yliaog All work as usual, because as I understand nothing requires 'transfer-encoding: chunked' except of allow_watch_bookmarks

https://github.com/kubernetes/kubernetes/search?q=transfer-encoding%3A+chunked&unscoped_q=transfer-encoding%3A+chunked

shows code with 'transfer-encoding: chunked'.

in watch.go, it was set at the following line.
https://github.com/kubernetes/kubernetes/blob/34f349257f4fc14c1adc8d9a62109216a6955035/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/watch.go#L201

I'm not sure since when it was set, could you please check your server version? is it a recent version that has that line?

@yliaog Yes, I saw this line as well, have the same version. That's why I have posted an issue here: I was pretty sure that the problem is on the client side.

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

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

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

doremi666 picture doremi666  路  4Comments

palnabarun picture palnabarun  路  4Comments

jmalobicky picture jmalobicky  路  4Comments

djamaile picture djamaile  路  3Comments

bjaworski3 picture bjaworski3  路  5Comments