Skip to content

Port ti.run to Task SDK execution path #50141

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

Merged
merged 1 commit into from
May 22, 2025
Merged

Conversation

kaxil
Copy link
Member

@kaxil kaxil commented May 3, 2025

This is the last thing to remove the parallel execution path.

For simplicity, ti.run and ti._run_raw_task have been retained, but they now use the Task SDK execution path. They have been retained so we don't have to make big bang changes in tests and PR remains relatively review-able. There are opportunities for evaluating & cleanup after this PR is merged:

  • get_template_context,
  • handle_failure,
  • check_and_change_state_before_execution
  • and probably a lot more.

The following bugs/missing features were identified and implemented:


^ 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.

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:task-sdk labels May 3, 2025
@kaxil kaxil force-pushed the try-replace branch 10 times, most recently from dc61ff3 to 7500c88 Compare May 10, 2025 07:01
@kaxil kaxil force-pushed the try-replace branch 7 times, most recently from b7dad41 to 00c4437 Compare May 21, 2025 18:56
@kaxil kaxil changed the title [DO NOT REVIEW] Trying something [DO NOT REVIEW] Port ti.run to Task SDK execution path May 21, 2025
@kaxil kaxil force-pushed the try-replace branch 6 times, most recently from 1e5e6a0 to 489aa26 Compare May 22, 2025 17:23
This is the last thing to remove the parallel execution path.

For simplicity, `ti.run` and `ti._run_raw_task` have been retained, but they now use the Task SDK execution path. They have been retained so we don't have to make big bang changes in tests and PR remains relatively review-able. There are opportunities for evaluating & cleanup after this PR is merged:
- `get_template_context`,
- `handle_failure`,
- `check_and_change_state_before_execution`
- and probably a lot more.

The following bugs/missing features were identified and implemented:
- Running `on_kill` on the Task SDK execution path
- Resolving lazy_object_proxies in the Context dict when running with a VirtualEnvOperator
- apache#50898
@kaxil kaxil changed the title [DO NOT REVIEW] Port ti.run to Task SDK execution path Port ti.run to Task SDK execution path May 22, 2025
@kaxil kaxil marked this pull request as ready for review May 22, 2025 17:25
@kaxil kaxil merged commit f1ca1d1 into apache:main May 22, 2025
97 of 124 checks passed
@kaxil kaxil deleted the try-replace branch May 22, 2025 18:08
kaxil added a commit to astronomer/airflow that referenced this pull request May 22, 2025
This is the last thing to remove the parallel execution path.

For simplicity, `ti.run` and `ti._run_raw_task` have been retained, but they now use the Task SDK execution path. They have been retained so we don't have to make big bang changes in tests and PR remains relatively review-able. There are opportunities for evaluating & cleanup after this PR is merged:
- `get_template_context`,
- `handle_failure`,
- `check_and_change_state_before_execution`
- and probably a lot more.

The following bugs/missing features were identified and implemented:
- Running `on_kill` on the Task SDK execution path
- Resolving lazy_object_proxies in the Context dict when running with a VirtualEnvOperator
- apache#50898

(cherry picked from commit f1ca1d1)
@kaxil
Copy link
Member Author

kaxil commented May 22, 2025

Porting Jarek's #protm from #50980 (comment)

dadonnelly316 pushed a commit to dadonnelly316/airflow that referenced this pull request May 26, 2025
This is the last thing to remove the parallel execution path.

For simplicity, `ti.run` and `ti._run_raw_task` have been retained, but they now use the Task SDK execution path. They have been retained so we don't have to make big bang changes in tests and PR remains relatively review-able. There are opportunities for evaluating & cleanup after this PR is merged:
- `get_template_context`,
- `handle_failure`,
- `check_and_change_state_before_execution`
- and probably a lot more.

The following bugs/missing features were identified and implemented:
- Running `on_kill` on the Task SDK execution path
- Resolving lazy_object_proxies in the Context dict when running with a VirtualEnvOperator
- apache#50898
sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
This is the last thing to remove the parallel execution path.

For simplicity, `ti.run` and `ti._run_raw_task` have been retained, but they now use the Task SDK execution path. They have been retained so we don't have to make big bang changes in tests and PR remains relatively review-able. There are opportunities for evaluating & cleanup after this PR is merged:
- `get_template_context`,
- `handle_failure`,
- `check_and_change_state_before_execution`
- and probably a lot more.

The following bugs/missing features were identified and implemented:
- Running `on_kill` on the Task SDK execution path
- Resolving lazy_object_proxies in the Context dict when running with a VirtualEnvOperator
- apache#50898
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API area:task-sdk
Development

Successfully merging this pull request may close these issues.

2 participants