Skip to content

Conversation

@o-nikolas
Copy link
Contributor

@o-nikolas o-nikolas commented Jun 4, 2025

Previously the ti primary key was used to create a UUID to identify which Airflow task started an ECS task, and if the same task was retried the same ECS Task could be used. However, operators now receive a RuntimeTaskInstance which does not have an equivalent key, so we now construct it with the attributes directly.

fixes #50742

Testing

Main:

A task retried, getting the same UUID (which would reattach, if this wasn't a somewhat mocked setup)

Screenshot from 2025-06-05 09-56-19

Screenshot from 2025-06-05 09-56-30

2.10.5

Screenshot from 2025-06-05 10-42-31

Screenshot from 2025-06-05 10-42-53


^ 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 airflow-core/newsfragments.

@o-nikolas o-nikolas requested a review from eladkal as a code owner June 4, 2025 20:28
@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Jun 4, 2025
Copy link
Contributor

@vincbeck vincbeck left a comment

Choose a reason for hiding this comment

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

Some tests need to be updated but other than that, LGTM

Previously the ti primary key was used to create a UUID to uniquely
identify which task started an ECS task, and if the same task was
retried the same ECS Task could be used. However, operators now
receive a RuntimeTaskInstance which does not have an equivalent key, so
we now construct it with the attributes directly.
@o-nikolas o-nikolas force-pushed the onikolas/ecs_reattach_fix branch from 77ca74f to f29a34d Compare June 5, 2025 17:25
@eladkal eladkal merged commit 8abcddd into apache:main Jun 6, 2025
70 checks passed
sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
Previously the ti primary key was used to create a UUID to uniquely
identify which task started an ECS task, and if the same task was
retried the same ECS Task could be used. However, operators now
receive a RuntimeTaskInstance which does not have an equivalent key, so
we now construct it with the attributes directly.
kevinhongzl pushed a commit to kevinhongzl/airflow that referenced this pull request Jun 7, 2025
Previously the ti primary key was used to create a UUID to uniquely
identify which task started an ECS task, and if the same task was
retried the same ECS Task could be used. However, operators now
receive a RuntimeTaskInstance which does not have an equivalent key, so
we now construct it with the attributes directly.
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.

EcsRunTaskOperator fails to run after upgrading to Airflow 3.0.1

3 participants