Cannot patch Vertical Pod Autoscaler objects
alfredopalhares opened this issue · 2 comments
Which project are you reporting a bug for?
kr8s
What happened?
Hello,
First of all, thank you for working an mainting this awesome library. I cannot patch an object of a type Vertical Pod Autocsaler
patch_values = {
"metadata": {
"annotations": {
"meta.helm.sh/release-name": release_name,
"meta.helm.sh/release-namespace": namespace,
},
"labels": {"app.kubernetes.io/managed-by": "Helm"},
}
}
k8s_obj.patch(patch_values)
And this works all nice and dandy minus on vertical pod autoscaler objects.
/path/to/my/project/helm_migrator/utils/k8s.py:196: RuntimeWarning: coroutine 'APIObject.patch' was never awaited
k8s_obj.patch(patch_values)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Is there anything I am doing wrong ? How can I further diagnose this
Anything else?
kr8s version 0.14.4
It looks like something is going wrong with how the k8s_obj
is being defined and you're ending up with an async object when you expect a sync object (e.g you need to call await k8s_obj.patch(patch_values)
when you shouldn't).
It looks like you're a few versions behind and there have been some fixes for this category of bug in the last few releases, so could you upgrade to the latest release?
If you still experience it after that can you share a full Minimal Reproducible Example? Something I can just copy/paste and reproduce the issue.
It's been a couple of weeks without activity here so I'm going to close this out as I expect it was fixed as part of the recent async object fixes. If this problem is still happening feel free to comment here and I'll reopen it.