Commit Graph

11 Commits

Author SHA1 Message Date
Mitar
06e48c585c Retry watch if request expires. 2020-07-15 12:27:32 -07:00
Oz N Tiram
c941d74b37 Remove all shebangs from Python modules and checker
As discussed, Python modules which aren't intended to be invoked
as scripts should not include a shebang line.

Update CONTRIBUTING.md and the checker script.
This script now includes a list SKIP_FILES for files that
should not be checked for boilerplate template.
The tests will now fail if a Python module has a shebang line.
Scripts which should have a shebang line and exists in the directory
`hack` can be ignored by adding them to the SKIP_FILES list.
2019-08-27 22:18:52 +02:00
Mitar
ad06e5c923 Added tests. 2019-02-18 16:43:50 -08:00
Kubernetes Prow Robot
2d69e89dab
Merge pull request #109 from juliantaylor/fix-watch-reset
fix watching with a specified resource version
2019-01-23 13:10:58 -08:00
Julian Taylor
3c30a30993 fix watching with a specified resource version
The watch code reset the version to the last found in the
response.
When you first list existing objects and then start watching from that
resource version the existing versions are older than the version you
wanted and the watch starts from the wrong version after the first
restart.
This leads to for example already deleted objects ending in the stream
again.

Fix this by setting the minimum resource version to reset from to the
input resource version. As long as k8s returns all objects in order in
the watch this should work.
We cannot use the integer value of the resource version to order it as
one should be treat the value as opaque.

Closes https://github.com/kubernetes-client/python/issues/700
2019-01-23 19:38:44 +01:00
Neha Yadav
d56fdbc0cc Verify Boilerplate fix 2018-12-05 22:22:59 +05:30
Haowei Cai
38cc2658bc Watch properly decode resourceVersion from custom object response 2018-04-27 14:12:41 -07:00
Chen Li
aec1c5259a Update continue the watch with resource_version 2017-10-26 19:45:17 -05:00
Chen Li
8f7b490086 Add flag to enable keep the watch action working all the time
Fixes issue: https://github.com/kubernetes-incubator/client-python/issues/124
2017-10-26 02:14:31 -05:00
Tomasz Prus
c656764766 fix: reset _stop when new stream is called 2017-08-21 00:50:32 +02:00
mbohlool
ecb8afa69f Copy over base folder of python-client 2017-05-12 11:08:29 -07:00