You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.
assertobjisNone, "cannot invoke objects on resource object."
self.api_obj_class=api_obj_class
returnself
The problem is that the code is expecting __get__ and __call__ to be executed in order. In https://github.com/miracle2k/k8s-snapshots we inadvertently ended up with a situation where that is not the case. Because we are watching two resources, in two separate threads, what happens during setup is that the methods are called in this order:
ObjectManager.get (for the PersistentVolume resource)
ObjectManager.get (for the PersistentVolumeClaim resource)
ObjectManager.call (for the PersistentVolume resource, but with self.api_obj_class set to PersistentVolumeClaim!)
ObjectManager.call (for the PersistentVolumeClaim resource)
In case it helps, a minimal example to reproduce this (Python 3.6) is here:
The code in question is here:
pykube/pykube/objects.py
Lines 14 to 23 in e8a4629
The problem is that the code is expecting
__get__
and__call__
to be executed in order. In https://github.com/miracle2k/k8s-snapshots we inadvertently ended up with a situation where that is not the case. Because we are watching two resources, in two separate threads, what happens during setup is that the methods are called in this order:In case it helps, a minimal example to reproduce this (Python 3.6) is here:
https://github.com/miracle2k/k8s-snapshots/tree/pykube-bug
The text was updated successfully, but these errors were encountered: