amoghrajesh commented on code in PR #45211:
URL: https://github.com/apache/airflow/pull/45211#discussion_r1897665433


##########
airflow/serialization/serialized_objects.py:
##########
@@ -1956,6 +1957,19 @@ def get_task_assets(
                     if isinstance(obj, of_type):
                         yield task["task_id"], obj
 
+    def get_run_data_interval(self, run: DagRun) -> DataInterval:
+        """Get the data interval of this run."""
+        if run.dag_id is not None and run.dag_id != self.dag_id:
+            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?

Review Comment:
   Do we need this?
   The older impl had this: 
https://github.com/apache/airflow/blob/3873230a11de8b9cc24d012ecdfe6848bc6ae0cf/airflow/models/dag.py#L538,
 and was mainly for dags prior 2.2 AF as per 
https://github.com/apache/airflow/blob/3873230a11de8b9cc24d012ecdfe6848bc6ae0cf/airflow/models/dag.py#L540-L569.
 Do we need to support this anymore or chop it off?



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