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


##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -2172,10 +2172,10 @@ def get_run_data_interval(self, run: DagRun) -> 
DataInterval:
             raise ValueError(f"Arguments refer to different DAGs: 
{self.dag_id} != {run.dag_id}")
 
         data_interval = _get_model_data_interval(run, "data_interval_start", 
"data_interval_end")
-        # the older implementation has call to infer_automated_data_interval 
if data_interval is None, do we want to keep that or raise
-        # an exception?
         if data_interval is None:
-            raise ValueError(f"Cannot calculate data interval for run {run}")
+            if run.logical_date is None:
+                raise ValueError(f"Cannot calculate data interval for run 
{run}")

Review Comment:
   If logical_date is None, we should simply allow the data interval to be None 
without error.



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