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 2022/01/21 14:56:05 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #21011: Fix the incorrect scheduling time for the first run of dag

uranusjr commented on a change in pull request #21011:
URL: https://github.com/apache/airflow/pull/21011#discussion_r789726105



##########
File path: airflow/timetables/interval.py
##########
@@ -232,7 +232,7 @@ def _skip_to_latest(self, earliest: Optional[DateTime]) -> DateTime:
             raise AssertionError("next schedule shouldn't be earlier")
         if earliest is None:
             return new_start
-        return max(new_start, earliest)
+        return max(new_start, self._get_next(earliest))

Review comment:
       This needs a test to ensure if `earliest` lies _exactly_ on the schedule, the first run is not one interval late. My intuition is this should use `self._align` instead, but a test would be required to verify that.




-- 
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: commits-unsubscribe@airflow.apache.org

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