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 2021/01/22 14:25:03 UTC

[GitHub] [airflow] ayushchauhan0811 commented on pull request #13832: removing try-catch block to fix timeout exception getting ignored in aws batch operator

ayushchauhan0811 commented on pull request #13832:
URL: https://github.com/apache/airflow/pull/13832#issuecomment-765435979


   > How would that solve it ? From what I understand it would simply result in a different exception thrown - but the flow will remain the same?
   
   @potiuk If you check [taskinstance.py](https://github.com/apache/airflow/blob/master/airflow/models/taskinstance.py#L1309) code, you can check that by removing the try-catch block exception raised by timeout class will now be handled by the taskinstance instead of the batch_operator class. 
   
   ```
   try:
       with timeout(task_copy.execution_timeout.total_seconds()):
           result = task_copy.execute(context=context)
   except AirflowTaskTimeout:
       task_copy.on_kill()
       raise
   ```


----------------------------------------------------------------
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:
users@infra.apache.org