pierrejeambrun commented on code in PR #63733:
URL: https://github.com/apache/airflow/pull/63733#discussion_r3010860129


##########
airflow-core/src/airflow/api/common/trigger_dag.py:
##########
@@ -166,14 +167,14 @@ def trigger_dag(
         raise DagNotFound(f"Dag id {dag_id} not found in DagModel")
 
     if dag_model.allowed_run_types is not None and run_type not in 
dag_model.allowed_run_types:
-        raise ValueError(f"Dag with dag_id: '{dag_id}' does not allow 
{run_type} runs")
+        raise ValueError(f"Dag with dag_id: '{dag_id}' does not allow 
{run_type.value} runs")

Review Comment:
   This too.



##########
airflow-core/src/airflow/api/common/trigger_dag.py:
##########
@@ -166,14 +167,14 @@ def trigger_dag(
         raise DagNotFound(f"Dag id {dag_id} not found in DagModel")
 
     if dag_model.allowed_run_types is not None and run_type not in 
dag_model.allowed_run_types:
-        raise ValueError(f"Dag with dag_id: '{dag_id}' does not allow 
{run_type} runs")
+        raise ValueError(f"Dag with dag_id: '{dag_id}' does not allow 
{run_type.value} runs")
 
     dagbag = DBDagBag()
     dr = _trigger_dag(
         dag_id=dag_id,
         dag_bag=dagbag,
-        run_id=run_id,
         run_type=run_type,
+        run_id=run_id,
         run_after=run_after or timezone.utcnow(),

Review Comment:
   Yep probably unrelated.



##########
airflow-core/src/airflow/api/common/trigger_dag.py:
##########
@@ -44,7 +44,7 @@ def _trigger_dag(
     dag_bag: DBDagBag,
     *,
     triggered_by: DagRunTriggeredByType,
-    run_type: DagRunType = DagRunType.MANUAL,
+    run_type: DagRunType,

Review Comment:
   Is removing the default value safe / necessary? 



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