Lee-W commented on code in PR #58229:
URL: https://github.com/apache/airflow/pull/58229#discussion_r2563869139


##########
airflow-core/src/airflow/models/dag.py:
##########
@@ -131,9 +131,17 @@ def get_run_data_interval(timetable: Timetable, run: 
DagRun) -> DataInterval:
 
     :meta private:
     """
-    data_interval = _get_model_data_interval(run, "data_interval_start", 
"data_interval_end")
-    if data_interval is not None:
+    if (
+        data_interval := _get_model_data_interval(run, "data_interval_start", 
"data_interval_end")
+    ) is not None:
         return data_interval
+
+    if run.logical_date is None:
+        raise ValueError("Try to infer data_interval without logical_date")

Review Comment:
   We kinda assume the logical_date won't be None in the original logic. But 
let me take another look 



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