kaxil commented on a change in pull request #19359:
URL: https://github.com/apache/airflow/pull/19359#discussion_r741511783
##########
File path: airflow/executors/kubernetes_executor.py
##########
@@ -599,13 +599,14 @@ def sync(self) -> None:
try:
self.kube_scheduler.run_next(task)
except ApiException as e:
- if e.reason == "BadRequest":
- self.log.error("Request was invalid. Failing task")
+ if e.reason in ("BadRequest", "Unprocessable Entity"):
+ self.log.error(f"Pod creation failed with reason
{e.reason!r}. Failing task")
Review comment:
```suggestion
if e.reason in ("BadRequest", "Unprocessable Entity"):
self.log.error("Pod creation failed with reason %r.
Failing task", e.reason)
```
--
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]