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 2020/06/02 14:20:45 UTC

[GitHub] [airflow] turbaszek commented on a change in pull request #8227: Add run_type to DagRun

turbaszek commented on a change in pull request #8227:
URL: https://github.com/apache/airflow/pull/8227#discussion_r433915046



##########
File path: airflow/api/common/experimental/trigger_dag.py
##########
@@ -68,15 +68,17 @@ def _trigger_dag(
                     execution_date.isoformat(),
                     min_dag_start_date.isoformat()))
 
+    run_type: Optional[DagRunType] = None
     if not run_id:
-        run_id = f"{DagRunType.MANUAL.value}__{execution_date.isoformat()}"
-
-    dag_run_id = dag_run.find(dag_id=dag_id, run_id=run_id)
-    if dag_run_id:
-        raise DagRunAlreadyExists("Run id {} already exists for dag id {}".format(
-            run_id,
-            dag_id
-        ))
+        run_type = DagRunType.MANUAL
+        dag_run = dag_run.find(dag_id=dag_id, run_type=run_type, execution_date=execution_date)

Review comment:
       I will fix it




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

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