You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/18 06:10:11 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #23516: clear specific dag run TI

uranusjr commented on code in PR #23516:
URL: https://github.com/apache/airflow/pull/23516#discussion_r922996093


##########
airflow/api_connexion/endpoints/task_instance_endpoint.py:
##########
@@ -433,10 +433,38 @@ def post_clear_task_instances(*, dag_id: str, session: Session = NEW_SESSION) ->
     if not dag:
         error_message = f"Dag id {dag_id} not found"
         raise NotFound(error_message)
-    reset_dag_runs = data.pop('reset_dag_runs')
-    dry_run = data.pop('dry_run')
-    # We always pass dry_run here, otherwise this would try to confirm on the terminal!
-    task_instances = dag.clear(dry_run=True, dag_bag=current_app.dag_bag, **data)
+    reset_dag_runs = data.pop('reset_dag_runs') == "true"

Review Comment:
   There is a `to_boolean` function we can use to better parse this.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org