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/04/20 14:59:17 UTC

[GitHub] [airflow] jedcunningham commented on a diff in pull request #23119: Fix TI failure handling when task cannot be unmapped.

jedcunningham commented on code in PR #23119:
URL: https://github.com/apache/airflow/pull/23119#discussion_r854200462


##########
airflow/models/taskinstance.py:
##########
@@ -1934,20 +1927,26 @@ def handle_failure(
         # only mark task instance as FAILED if the next task instance
         # try_number exceeds the max_tries ... or if force_fail is truthy
 
+        task = None
+        try:
+            task = self.task.unmap()
+        except Exception:
+            self.log.error("Unable to unmap task, can't determine if we need to send an alert email ot not")

Review Comment:
   ```suggestion
               self.log.error("Unable to unmap task, can't determine if we need to send an alert email or not")
   ```



-- 
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