Skip to content

Conversation

@dacort
Copy link
Contributor

@dacort dacort commented May 9, 2023

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.

@dacort dacort requested review from eladkal and o-nikolas as code owners May 9, 2023 20:33
@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels May 9, 2023
@dacort
Copy link
Contributor Author

dacort commented May 12, 2023

Updated w/PR comments

@o-nikolas o-nikolas merged commit d6051fd into apache:main May 12, 2023
@dacort dacort deleted the fix/emr-serverless-cancel branch May 13, 2023 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't cancel EMR Serverless task

3 participants