dacort opened a new pull request, #31169:
URL: https://github.com/apache/airflow/pull/31169

   closes: #31099
   
   This PR adds support for `on_kill` in `EmrServerlessStartJobOperator`. In 
the event that the job is marked as failed in the UI, it will now be cancelled 
in EMR Serverless as well. 
   
   Tested manually by marking a failing DAG in the UI and observing the 
following output in the logs and the EMR job transitioning to `CANCELLED`.
   
   ```
   [2023-05-09, 20:01:59 UTC] {local_task_job_runner.py:299} WARNING - State of 
this instance has been externally set to failed. Terminating instance.
   [2023-05-09, 20:01:59 UTC] {process_utils.py:135} INFO - Sending 
Signals.SIGTERM to group 1431. PIDs of all processes in the group: [1431]
   [2023-05-09, 20:01:59 UTC] {process_utils.py:86} INFO - Sending the signal 
Signals.SIGTERM to group 1431
   [2023-05-09, 20:01:59 UTC] {taskinstance.py:1585} ERROR - Received SIGTERM. 
Terminating subproces
   ```
   
   Additionally, fixed a couple return types in the EMR operator.


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

Reply via email to