leossantos commented on code in PR #64322:
URL: https://github.com/apache/airflow/pull/64322#discussion_r3015654325


##########
airflow-core/src/airflow/models/dag.py:
##########
@@ -677,6 +681,16 @@ def dag_ready(dag_id: str, cond: SerializedAssetBase, 
statuses: dict[UKey, bool]
             for dag_id, adrqs in adrq_by_dag.items()
         }
         ser_dags = 
SerializedDagModel.get_latest_serialized_dags(dag_ids=list(dag_statuses), 
session=session)
+        ser_dag_ids = {ser_dag.dag_id for ser_dag in ser_dags}
+        missing_from_serialized = set(adrq_by_dag.keys()) - ser_dag_ids
+        if missing_from_serialized:
+            log.debug(
+                "DAGs in ADRQ but missing SerializedDagModel (skipping — 
condition cannot be evaluated): %s",
+                sorted(missing_from_serialized),
+            )
+            for dag_id in missing_from_serialized:
+                del adrq_by_dag[dag_id]
+                del dag_statuses[dag_id]

Review Comment:
   Thanks, @Lee-W. I've accepted most of the suggestions, but I'll skip the one 
for line 685 as it contains a small error. I'm going to apply the fix manually 
and push the update shortly. The rest are all set!



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