The GitHub Actions job "Tests (AMD)" on 
airflow.git/fix-k8s-executor-pod-override-pickle has failed.
Run started by GitHub user vatsrahul1001 (triggered by vatsrahul1001).

Head commit for run:
7cf53dc6bf531405544d3baf5f2e3daf6a0bb523 / Rahul Vats <[email protected]>
Fix KubernetesExecutor scheduler crash when pod_override is queued in-cluster

When the scheduler runs in-cluster, kubernetes-python-client v36 changed model
constructors to use Configuration.get_default_copy() instead of Configuration()
(kubernetes-client/python#2532, OpenAPI Generator v6.6.0). So every V1Pod built
after load_incluster_config() captures the global in-cluster Configuration,
whose refresh_api_key_hook is a local closure
(InClusterConfigLoader._set_config.<locals>._refresh_api_key). pickle cannot
serialize a local closure, so putting a task's pod_override V1Pod on the
executor's multiprocessing queue raises PicklingError and crashes the scheduler
in a loop. This affects any in-cluster KubernetesExecutor deployment where a 
task
sets a V1Pod pod_override, independent of the Airflow version; pinning the 
client
below 36 is not viable because 35.x has a separate no_proxy regression.

Reset local_vars_configuration to a fresh Configuration() on the pod_override
(recursively) before queuing -- exactly what v35 model constructors produced. It
carries no in-cluster auth hook so the pod is picklable, while keeping
client_side_validation so the worker-side reconcile_pods setters still work.
(Setting it to None instead breaks reconcile: model setters dereference
self.local_vars_configuration.client_side_validation.) The pod keeps its V1Pod
type through the queue, so run_next is unchanged.

Report URL: https://github.com/apache/airflow/actions/runs/27940770747

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to