kevinhongzl commented on code in PR #56346:
URL: https://github.com/apache/airflow/pull/56346#discussion_r2411461045


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:
##########
@@ -737,17 +737,15 @@ def post_clear_task_instances(
         body.end_date = None
 
     task_ids = body.task_ids
-    if task_ids is not None:
-        task_id = [task[0] if isinstance(task, tuple) else task for task in 
task_ids]
-        dag = dag.partial_subset(
+    if task_ids is not None and (upstream or downstream):
+        task_id = set([task[0] if isinstance(task, tuple) else task for task 
in task_ids])

Review Comment:
   `task_id` is taken as an argument in `dag.partial_subset()`, while 
`task_ids` is one of the common args for `dag.clear`. Thus, renaming `task_id` 
into its plural form could break the logic here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to