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


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/ui/assets.py:
##########
@@ -110,12 +121,101 @@ def next_run_assets(
             isouter=True,
         )
 
-    events = [dict(info._mapping) for info in session.execute(query)]
-    for event in events:
-        if not event.pop("queued", None):
-            event["lastUpdate"] = None
+    raw_rows = list(session.execute(query))
+
+    if not is_partitioned:
+        events = [
+            NextRunAssetEventResponse(
+                id=row.id,
+                name=row.name,
+                uri=row.uri,
+                last_update=row.last_update if row.queued else None,
+            )
+            for row in raw_rows
+        ]
+        return 
NextRunAssetsResponse(asset_expression=dag_model.asset_expression, 
events=events)
+
+    # Partitioned Dags: enrich with per-asset received/required counts and 
rollup flag.
+    timetable = _load_timetable(dag_id, session)

Review Comment:
   added a `DagModel.partition_mapper_info` as cache



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