jason810496 commented on code in PR #56351:
URL: https://github.com/apache/airflow/pull/56351#discussion_r2435512562


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:
##########
@@ -773,13 +775,26 @@ def post_clear_task_instances(
             end_date=body.end_date,
         )
 
+    params = inspect.signature(clear_task_instances).parameters
+    kwargs = {
+        "run_on_latest_version": body.run_on_latest_version,
+    }
+
+    # Only include this argument if the function supports it
+    if "prevent_running_task" in params:
+        kwargs["prevent_running_task"] = body.prevent_running_task

Review Comment:
   May I ask why do we need to check the params of `clear_task_instances` at 
runtime? Thanks.



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