The GitHub Actions job "Tests (AMD)" on 
airflow.git/fix-k8s-executor-config-pickling has failed.
Run started by GitHub user roshanprabu (triggered by potiuk).

Head commit for run:
e650dcea44b23747ed340adf365cffb7892ab303 / roshanprabu <[email protected]>
Fix scheduler crash pickling in-cluster pod_override onto executor queue

In-cluster, kubernetes-client 36.x's default Configuration (set by
InClusterConfigLoader) carries a refresh_api_key_hook local closure.
Any V1Pod/nested model built without an explicit local_vars_configuration
picks up that closure via Configuration.get_default_copy() -- which is
exactly what happens to a task's pod_override, since user DAG code never
passes local_vars_configuration explicitly.

execute_async then embeds that pod_override in a KubernetesJob and puts
it on task_queue, a multiprocessing.Manager().JoinableQueue(). The
manager's put() pickles the object to send it over IPC, and pickle can't
serialize the closure -- crashing the scheduler process itself (not just
failing the task) on every task with a pod_override, in a loop, since
the same task gets re-queued after the scheduler restarts.

PodGenerator.deserialize_model_dict already builds V1Pod objects against
a fresh Configuration() specifically to avoid capturing the process-global
in-cluster default (its docstring says as much), but execute_async never
routed pod_override through it. Round-tripping kube_executor_config
through PodGenerator.serialize_pod + deserialize_model_dict wires up
that existing protection at the one call site that was missing it.

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

With regards,
GitHub Actions via GitBox


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

Reply via email to