sunank200 commented on code in PR #46512:
URL: https://github.com/apache/airflow/pull/46512#discussion_r1946539529


##########
airflow/www/views.py:
##########
@@ -2224,20 +2224,27 @@ def trigger(self, dag_id: str, session: Session = 
NEW_SESSION):
                     "warning",
                 )
 
-        data_interval = 
dag.timetable.infer_manual_data_interval(run_after=logical_date)
-        if not run_id:
-            run_id = dag.timetable.generate_run_id(
-                logical_date=logical_date,
-                data_interval=data_interval,
-                run_type=DagRunType.MANUAL,
-            )
+        run_after = timezone.utcnow()
+        if logical_date:
+            data_interval = 
dag.timetable.infer_manual_data_interval(run_after=logical_date)
+            run_after = data_interval.end
+            if not run_id:
+                run_id = dag.timetable.generate_run_id(
+                    logical_date=logical_date,
+                    data_interval=data_interval,
+                    run_type=DagRunType.MANUAL,
+                )
+        else:
+            data_interval = None
+            if not run_id:
+                run_id = f"manual__{timezone.utcnow().isoformat()}"

Review Comment:
   But this will fail tests. So I will pass logical_date as part of tests then?



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