You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update taskinstance clear endpoint to support mapped tasks #44867
We need the endpoint to have same functionality as clear button in the UI.
Note: The task needs to accommodate both clearing a task and clearing a map index (when using dynamic task mapping)
for reference you can see previous PRs that added functionality to the Rest API: #41017, #39138
Update (after discussing in comments)
Move clear endpoint from Dag to TaskInstance
Add support for mapped index
Committer
I acknowledge that I am a maintainer/committer of the Apache Airflow project.
Do let me know if this is what you wanted in implementation, if yes should I move this endpoint from DAG to TaskInstance in legacy API?
In my perspective yes. I expect to find clear action on task instance endpoints but I think it's a good idea to track the PR added it and see if there was discussion around why it's placed there. We may be missing something.
By the way, it seems like with current endpoint you are not able to clear a specific map index in a specific task instance so I think we need to add support for this.
Maybe we should close this one, or update it in favor of a feature request
In the wrong place. Its not intuitive to find it under DAGs. So this issue is about moving it and refactor it to support mapped tasks. @vatsrahul1001 do you need me to update issue description?
changed the title [-]Add taskinstance clear endpoint to the rest api[/-][+]Update taskinstance clear endpoint to support mapped tasks[/+]on Dec 18, 2024
Activity
vatsrahul1001 commentedon Dec 12, 2024
I can work on this. Assigning it to myself.
vatsrahul1001 commentedon Dec 12, 2024
@eladkal Should I also create an Issue to migrate this to FastAPI as well?
eladkal commentedon Dec 12, 2024
No need for another issue. You can simply start another PR directly
vatsrahul1001 commentedon Dec 17, 2024
@eladkal We do have taskinstance clear endpoint implementation already here. As per openapi spec its under DAG endpoint here.
In FastAPI we have correctly added this under taskinstances.

Do let me know if this is what you wanted in implementation, if yes should I move this endpoint from DAG to TaskInstance in legacy API?
eladkal commentedon Dec 17, 2024
In my perspective yes. I expect to find clear action on task instance endpoints but I think it's a good idea to track the PR added it and see if there was discussion around why it's placed there. We may be missing something.
By the way, it seems like with current endpoint you are not able to clear a specific map index in a specific task instance so I think we need to add support for this.
pierrejeambrun commentedon Dec 18, 2024
Maybe we should close this one, or update it in favor of a feature request for a more fined grained clearing capabilities on 'mapped task instances' ?
As I understand the endpoint exists, it just needs improvement ?
eladkal commentedon Dec 18, 2024
In the wrong place. Its not intuitive to find it under DAGs. So this issue is about moving it and refactor it to support mapped tasks. @vatsrahul1001 do you need me to update issue description?Updated title and description
[-]Add taskinstance clear endpoint to the rest api[/-][+]Update taskinstance clear endpoint to support mapped tasks[/+]