rmanvar-indeed opened a new issue #13129: URL: https://github.com/apache/airflow/issues/13129
<!-- Welcome to Apache Airflow! For a smooth issue process, try to answer the following questions. Don't worry if they're not all applicable; just try to include what you can :-) If you need to include code snippets or logs, please put them in fenced code blocks. If they're super-long, please use the details tag like <details><summary>super-long log</summary> lots of stuff </details> Please delete these comment blocks before submitting the issue. --> **Description** From https://github.com/apache/airflow/blob/v1-10-stable/airflow/contrib/operators/kubernetes_pod_operator.py#L291 Airflow K8PodOperator tries to re-attach to pod based on labels, but this fails if pod isn't in running state which for us is often the case because reason for previous trial to fail is pod not being in a running / healthy state. Returned error for K8 api is `{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"container "base" in pod "XXXXXX" is terminated","reason":"BadRequest","code":400}` **Use case / motivation** <!-- What do you want to happen? Rather than telling us how you might implement this solution, try to take a step back and describe what you are trying to achieve. --> Airflow will try to attach only if the Pod is in running state. **Are you willing to submit a PR?** <!--- We accept contributions! --> Yup. sound like an easy fix where we replace the `client.list_namespaced_pod` with some other modified version which filters pods in running state. **Related Issues** <!-- Is there currently another issue associated with this? --> ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
