You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/12/03 14:59:25 UTC

[GitHub] [airflow] hterik commented on a diff in pull request #27611: Make Kubernetes Executor & Scheduler Resilient to error during PMH execution

hterik commented on code in PR #27611:
URL: https://github.com/apache/airflow/pull/27611#discussion_r1038788637


##########
airflow/executors/kubernetes_executor.py:
##########
@@ -256,7 +256,10 @@ def __init__(
 
     def run_pod_async(self, pod: k8s.V1Pod, **kwargs):
         """Runs POD asynchronously"""
-        pod_mutation_hook(pod)
+        try:
+            pod_mutation_hook(pod)
+        except Exception as e:
+            raise PodMutationHookException(e)

Review Comment:
   I believe this should be `raise PodMutationHookException() from e` ? Otherwise it will be logged as an exception happening while handling another exception.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org