Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add on_kill to EMR Serverless Job Operator #31169

Merged
merged 4 commits into from
May 12, 2023

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.

@boring-cyborg boring-cyborg bot added area:providers provider:amazon-aws 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 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