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



##########
File path: airflow/timetables/interval.py
##########
@@ -43,6 +43,13 @@ def __eq__(self, other: Any) -> bool:
     def validate(self) -> None:
         self._schedule.validate()
 
+    def infer_data_interval(self, run_after: DateTime) -> 
Optional[DataInterval]:
+        # Get the last complete period before run_after, e.g. if a DAG run is
+        # scheduled at each midnight, the data interval of a manually 
trioggered
+        # run at 1am 25th is between 0am 24th and 0am 25th.

Review comment:
       What I like about this strategy is we set data interval to a period that 
always makes sense, instead of some in-between period that doesn’t conform to 
any DAG scheduling rules. But admittedly I don’t really know what people use 
manual triggers for (except for testing, for which the data interval doesn’t 
matter anyway) so maybe this is not what they want.




-- 
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-unsubscr...@airflow.apache.org

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


Reply via email to