ashb commented on a change in pull request #15397:
URL: https://github.com/apache/airflow/pull/15397#discussion_r644663968



##########
File path: airflow/www/views.py
##########
@@ -2298,8 +2298,10 @@ def duration(self, session=None):
         else:
             base_date = dag.get_latest_execution_date() or timezone.utcnow()
 
-        dates = dag.date_range(base_date, num=-abs(num_runs))
-        min_date = dates[0] if dates else timezone.utc_epoch()
+        min_date = next(
+            dag.time_table.iter_next_n(base_date, 1),
+            timezone.utc_epoch(),
+        )

Review comment:
       This was powering the "dag runs" drop down on the graph view etc.
   
   
![image](https://user-images.githubusercontent.com/34150/120627600-bd2f6500-c45b-11eb-9399-c1d8adb15b49.png)
   
   So this change will break the values in the drop down (and yes, it's not 
covered by tests. UI tests are hard/bad)




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to