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


##########
airflow-core/src/airflow/timetables/trigger.py:
##########
@@ -485,15 +477,15 @@ def next_dagrun_info_v2(
             else:
                 next_start_time = self._align_to_next(restriction.earliest)
         else:
-            prev_candidate = self._align_to_prev(coerce_datetime(utcnow()))
-            start_time_candidates = [prev_candidate]
             if last_dagrun_info is not None:
-                next_candidate = self._get_next(last_dagrun_info.run_after)
-                start_time_candidates.append(next_candidate)
-            elif restriction.earliest is None:
-                # Run immediately has no effect if there is restriction on 
earliest
-                first_run = self._calc_first_run()
-                start_time_candidates.append(first_run)
+                # _calc_first_run respects run_immediately to decide between 
the
+                # most recent past cron point and the next future one.
+                start_time_candidates = [
+                    self._calc_first_run(),
+                    self._get_next(last_dagrun_info.run_after),
+                ]
+            else:

Review Comment:
   Same as mentioned above; comment is confusing.



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