-
Notifications
You must be signed in to change notification settings - Fork 16.4k
fix: enable api to clear ti instances by specifying map indexes #56346
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
fix: enable api to clear ti instances by specifying map indexes #56346
Conversation
|
I think you need to rebase main, some of the CI tests are failing because of that. Also, it seems that the changes don't reference the |
fc50916 to
08fd98c
Compare
|
Appreciate your comments and review @seanghaeli ! As I'm working on this issue, I also reviewed relevant PRs and discussions about clearing task instances in AF2 (#22958, #24699, #45349). Currently, we are clearing multiple mapped tasks by passing a list of tuples There is no However, your comments reminded me that it might be unclear for users how to include the map index when using this endpoint. I'll improve the descriptions and documentation as well. Thank you! |
838e1ea to
5c4d8da
Compare
jason810496
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I will talk a closer look for over all structure later.
airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py
Outdated
Show resolved
Hide resolved
pierrejeambrun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a few nits.
airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py
Outdated
Show resolved
Hide resolved
airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py
Outdated
Show resolved
Hide resolved
8153adb to
16f8bf8
Compare
16f8bf8 to
0223959
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me.
I just pushed a really small adjustment commit for these nits, ready to merge.
airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py
Outdated
Show resolved
Hide resolved
airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py
Outdated
Show resolved
Hide resolved
airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py
Outdated
Show resolved
Hide resolved
461de61 to
56c6a84
Compare
…ndexes (#56346) * fix: enable api to clear ti instances by specifying map indexes * chore: add tests for clearing mapped task instances from api endpoint * chore: add descriptions to task_ids in the payload * fix: deal with tests that were broken when map_indexes was introduced * chore: generate datamodel and api spec * chore: rewrite clear task_ids for clarity and remove duplicate tasks * Small adjustments --------- (cherry picked from commit 800f733) Co-authored-by: Zhen-Lun (Kevin) Hong <zhenlun.hong01@gmail.com> Co-authored-by: pierrejeambrun <pierrejbrun@gmail.com>
…ndexes (#56346) (#56945) * fix: enable api to clear ti instances by specifying map indexes * chore: add tests for clearing mapped task instances from api endpoint * chore: add descriptions to task_ids in the payload * fix: deal with tests that were broken when map_indexes was introduced * chore: generate datamodel and api spec * chore: rewrite clear task_ids for clarity and remove duplicate tasks * Small adjustments --------- (cherry picked from commit 800f733) Co-authored-by: Zhen-Lun (Kevin) Hong <zhenlun.hong01@gmail.com> Co-authored-by: pierrejeambrun <pierrejbrun@gmail.com>
…he#56346) * fix: enable api to clear ti instances by specifying map indexes * chore: add tests for clearing mapped task instances from api endpoint * chore: add descriptions to task_ids in the payload * fix: deal with tests that were broken when map_indexes was introduced * chore: generate datamodel and api spec * chore: rewrite clear task_ids for clarity and remove duplicate tasks * Small adjustments --------- Co-authored-by: pierrejeambrun <pierrejbrun@gmail.com>
|
@pierrejeambrun Thank you! |
closes: #56289 (also close #43635)
Why this change
This PR resolves the issue where the api endpoint
clearTaskInstancefails to operate on mapped TIs. Previously, there were cases that we could not clear mapped tasks individually even when their map indices were provided in payload.Solution
task_ids. This was the root cause of the failure to clear single mapped tasks.task_ids(i.e. how to include map indices to reference specific mapped task instances)^ 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.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.