Soonmok commented on code in PR #28398:
URL: https://github.com/apache/airflow/pull/28398#discussion_r1051306708


##########
airflow/api/common/trigger_dag.py:
##########
@@ -51,7 +51,11 @@ def _trigger_dag(
     if dag is None or dag_id not in dag_bag.dags:
         raise DagNotFound(f"Dag id {dag_id} not found")
 
-    execution_date = execution_date if execution_date else timezone.utcnow()
+    if execution_date is None:
+        if conf and "logical_date" in conf:
+            execution_date = conf["logical_date"]

Review Comment:
   Okay. 
   According to the issue, the issuer triggered the dag with config. so I 
assumed it was triggered with execution_date which is set by default_args.
   but not I think there is another reason of this issue. I'll look it up more.



##########
airflow/api/common/trigger_dag.py:
##########
@@ -51,7 +51,11 @@ def _trigger_dag(
     if dag is None or dag_id not in dag_bag.dags:
         raise DagNotFound(f"Dag id {dag_id} not found")
 
-    execution_date = execution_date if execution_date else timezone.utcnow()
+    if execution_date is None:
+        if conf and "logical_date" in conf:
+            execution_date = conf["logical_date"]

Review Comment:
   Okay. 
   According to the issue, the issuer triggered the dag with config. so I 
assumed it was triggered with execution_date which is set by default_args.
   but now I think there is another reason of this issue. I'll look it up more.



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