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

ECS Executor - add support to adopt orphaned tasks. #37786

Merged

Conversation

ferruzzi
Copy link
Contributor

@ferruzzi ferruzzi commented Feb 29, 2024

### Depends on and blocked by #37784 <= merged

Once the external_executor_id bug is fixed, this will add the feature to adopt abandoned tasks in the ECS Executor. To test, you can launch an ECS Executor environment and run a dag which takes a few minutes. While it is running, kill the scheduler. Before this change, when you restart the scheduler, the existing ECS job will be terminated and rescheduled/restarted. After this change, the running task will be adopted; it will finish and be monitored as if it was launched by this executor/scheduler instance.

Was previously #36803

closes: #35491


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@ferruzzi
Copy link
Contributor Author

@eladkal - You had some comments in the previous attempt at this, you may want to have eyes on this one.

Copy link
Contributor

@syedahsn syedahsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@ferruzzi ferruzzi force-pushed the ferruzzi/ecs-executor/adoption-agency branch 3 times, most recently from 98fe86b to c390d07 Compare March 6, 2024 20:26
@ferruzzi ferruzzi force-pushed the ferruzzi/ecs-executor/adoption-agency branch from c390d07 to ee6f7ba Compare March 6, 2024 21:02
@ferruzzi ferruzzi merged commit f2628fd into apache:main Mar 6, 2024
56 checks passed
@ferruzzi ferruzzi deleted the ferruzzi/ecs-executor/adoption-agency branch March 6, 2024 22:12
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Mar 14, 2024
howardyoo pushed a commit to howardyoo/airflow that referenced this pull request Mar 18, 2024
howardyoo pushed a commit to howardyoo/airflow that referenced this pull request Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Executors-core LocalExecutor & SequentialExecutor area:providers changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) provider:amazon-aws AWS/Amazon - related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ECS Executor - Adopting Task Instances
5 participants