ashb commented on code in PR #49353:
URL: https://github.com/apache/airflow/pull/49353#discussion_r2046863651


##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -1930,14 +1935,18 @@ def _replace_dataset_with_asset_in_timetables(obj, 
parent_key=None):
         # Set on the root TG
         dag_dict["task_group"]["group_display_name"] = ""
 
+        return dag_warnings
+
     @classmethod
     def from_dict(cls, serialized_obj: dict) -> SerializedDAG:
         """Deserializes a python dict in to the DAG and operators it 
contains."""
         ver = serialized_obj.get("__version", "<not present>")
         if ver not in (1, 2):
             raise ValueError(f"Unsure how to deserialize version {ver!r}")
         if ver == 1:
-            cls.conversion_v1_to_v2(serialized_obj)
+            if warnings := cls.conversion_v1_to_v2(serialized_obj):
+                with create_session() as session:
+                    session.add_all(warnings)

Review Comment:
   Won't this add warning rows each and every time it fetches the serialized 
dag from the DB (There's some caching on, so not _every_ time, but more often 
than we want)? 



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