henry3260 opened a new pull request, #72502: URL: https://github.com/apache/airflow/pull/72502
## Why `KubernetesPodOperator.await_pod_completion` decides whether it still has to wait for the base container with `self.base_container_name not in self.container_logs`. `container_logs` accepts a single container name as a plain string, and that is also the default (`"base"`), so for string values this is a substring check rather than a membership check. Any name that merely contains the base container name, such as a typo like `"base2"` or a sidecar named `"base-metrics"`, makes the operator believe the base container's logs are being followed and skip `await_container_completion`. With `do_xcom_push=True` the operator then execs into the XCom sidecar while the base container is still running, reads an empty `return.json`, tears the sidecar down, and the task succeeds with a `None` XCom. Nothing is logged as an error, so downstream tasks silently receive wrong data. ## What - `providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py`: normalise a string `container_logs` into a single-element list before the membership check in `await_pod_completion`, so the base container is awaited whenever its logs are not actually being followed. Behaviour for `True` and list values is unchanged. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Fable 5.1) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
