ayush-san opened a new issue #13733:
URL: https://github.com/apache/airflow/issues/13733


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the 
following questions.
   Don't worry if they're not all applicable; just try to include what you can 
:-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the 
context.
   
   -->
   
   **Apache Airflow version**: 1.10.12
   
   
   - **Cloud provider or hardware configuration**: AWS
   - **OS** (e.g. from /etc/os-release): Amazon Linux 2
   - **Kernel** (e.g. `uname -a`): Linux
   - **Install tools**: All
   
   **What happened**:
   
   We have a task timeout for Batch jobs of around 15hrs, but on_kill() doesn't 
get called even when the task timeout.
   
   **What you expected to happen**:
   
   After the task has run its allocated time period, it should get killed and 
simultaneously kill job running on AWS Batch
   
   **How to reproduce it**:
   You can try by adding timeout for any batch task, on_kill method doesn't get 
called
   
![image](https://user-images.githubusercontent.com/57655135/104878486-0e91f880-5982-11eb-8077-27c050889c8d.png)
   
   
   **Anything else we need to know**:
   
   After debugging I found that this issue is happening due to a try-catch 
block in 
[awsbatch_operator.py#L129](https://github.com/apache/airflow/blob/1.10.12/airflow/contrib/operators/awsbatch_operator.py#L129).
 
   
   After removing this try-catch block, tasks are getting killed on the AWS 
side too
   
![image](https://user-images.githubusercontent.com/57655135/104878793-9d9f1080-5982-11eb-98f9-9ebe53554544.png)
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to