uranusjr commented on code in PR #69058:
URL: https://github.com/apache/airflow/pull/69058#discussion_r3484499501
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py:
##########
@@ -478,6 +498,37 @@ def _change_state(
self.kube_scheduler.patch_pod_executor_done(pod_name=pod_name,
namespace=namespace)
self.log.info("Patched pod %s in namespace %s to mark it as done",
key, namespace)
+ if state == TaskInstanceState.FAILED and
self._is_pre_execution_failure(
+ state,
+ self._get_task_instance_state(key, session=session),
+ failure_details,
+ self.pod_launch_failure_excluded_container_reasons,
+ ):
Review Comment:
```suggestion
if (
state == TaskInstanceState.FAILED
and self.pod_launch_failure_max_retries != 0
and self._is_pre_execution_failure(
state,
self._get_task_instance_state(key, session=session),
failure_details,
self.pod_launch_failure_excluded_container_reasons,
)
):
```
This saves some db queries when no retries are allowed. Not a big deal, I
think? (It shouldn’t be too common to explicitly disallow retries.)
--
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]