kaxil commented on code in PR #44972:
URL: https://github.com/apache/airflow/pull/44972#discussion_r1890627660


##########
airflow/serialization/serialized_objects.py:
##########
@@ -1870,3 +1871,55 @@ def _has_kubernetes() -> bool:
     except ImportError:
         HAS_KUBERNETES = False
     return HAS_KUBERNETES
+
+
+class LazyDeserializedDAG(pydantic.BaseModel):
+    """
+    Lazily build information from the serialized DAG structure.
+
+    An object that will present "enough" of the DAG like interface to update 
DAG db models etc, without having
+    to deserialize the full DAG and Task hierarchy.
+    """
+
+    data: dict
+
+    NULLABLE_PROPERTIES: ClassVar[set[str]] = {
+        "is_paused_upon_creation",
+        "owner",
+        "dag_display_name",
+        "description",
+        "max_active_tasks",
+        "max_active_runs",
+        "max_consecutive_failed_dag_runs",
+        "owner_links",
+    }
+
+    @property
+    def hash(self) -> str:
+        from airflow.models.serialized_dag import SerializedDagModel
+
+        return SerializedDagModel.hash(self.data)
+
+    def next_dagrun_info(self, last):

Review Comment:
   `typing.NoReturn` :) 
   
   https://docs.python.org/3/library/typing.html#typing.NoReturn



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