[WAITING] chore: Upgrade to kubernetes v36 and fix ApiClient.__new__ incompatibility#260
[WAITING] chore: Upgrade to kubernetes v36 and fix ApiClient.__new__ incompatibility#260morgan-wowk wants to merge 1 commit into
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Local-dev RCA: Kubernetes Python Client v36 — Execution FailuresDate: 2026-05-22 SummaryAll pipeline executions failed with Timeline
Root CauseBreak 1 — Authentication silently dropped (403
|
kubernetes v36.0.0 changed ApiClient.__deserialize_model() to access self.configuration. Constructing ApiClient via __new__() bypasses __init__ and leaves configuration unset, causing AttributeError at deserialization time. Replace ApiClient.__new__(ApiClient) with ApiClient() in both _kubernetes_serialize and _kubernetes_deserialize so that __init__ runs and configuration is properly initialized.
0963050 to
bca04f8
Compare
|
Thank you, Morgan! Note: 36.0.1 has just been released: https://github.com/kubernetes-client/python/releases/tag/v36.0.1 with fixes.
I wonder why I did that hack. Likely there was something the ApiClient constructor was doing that I did not like (maybe obtaining some configuration and credentials). Worth checking what the constructor now does.
Not great... |
|
@Ark-kun Thankfully they are addressing some of the widely reported issues:
|
|
I'll return to this after the 7 day cooldown period and reduce the changes to only what is needed on v36.0.1 now. |

Problem
Executions fail on kubernetes package v36.0.0 with the error
403 - User "system:anonymous.Before merging
v36.0.0has breaking changes.cloud_pipelines_backend/launchers/kubernetes_launchers.py .uv.lockin this PR is not meant to be the final version. We need to wait for the 7 day cooldown on package upgrades before we can reliably upgrade only kubernetes.Changes
kubernetes v36.0.0 changed ApiClient.__deserialize_model() to access
self.configuration. Constructing ApiClient via new() bypasses init
and leaves configuration unset, causing AttributeError at deserialization time.
Replace ApiClient.new(ApiClient) with ApiClient() in both
_kubernetes_serialize and _kubernetes_deserialize so that init runs
and configuration is properly initialized.