jason810496 commented on code in PR #56351:
URL: https://github.com/apache/airflow/pull/56351#discussion_r2486282442
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:
##########
@@ -792,13 +793,22 @@ def post_clear_task_instances(
only_running=body.only_running,
)
+ 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:
After double check, we don't need `inspect` to check `clear_task_instances`.
We just need to fix the test like following, FYI:
https://github.com/apache/airflow/pull/57123/commits/2c38bdb3c0a7c801d23aa43162c6b92dd7e1f194
--
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]