leossantos commented on code in PR #63546:
URL: https://github.com/apache/airflow/pull/63546#discussion_r2997608928
##########
airflow/models/dag.py:
##########
@@ -4094,13 +4094,35 @@ def dag_ready(dag_id: str, cond: BaseDataset, statuses:
dict) -> bool | None:
ser_dags = session.scalars(
select(SerializedDagModel).where(SerializedDagModel.dag_id.in_(dag_statuses.keys()))
).all()
+ ser_dag_ids = {s.dag_id for s in ser_dags}
+ missing_from_serialized = set(by_dag.keys()) - ser_dag_ids
+ if missing_from_serialized:
+ log.warning(
+ "[DEBUG DATASETS] DAGs in DDRQ but missing SerializedDagModel "
+ "(skipping — condition cannot be evaluated): %s",
+ sorted(missing_from_serialized),
+ )
+ for dag_id in missing_from_serialized:
+ del by_dag[dag_id]
+ del dag_statuses[dag_id]
+ del missing_from_serialized
for ser_dag in ser_dags:
dag_id = ser_dag.dag_id
statuses = dag_statuses[dag_id]
+ dataset_condition = ser_dag.dag.timetable.dataset_condition
- if not dag_ready(dag_id,
cond=ser_dag.dag.timetable.dataset_condition, statuses=statuses):
+ if not dag_ready(dag_id, cond=dataset_condition,
statuses=statuses):
del by_dag[dag_id]
del dag_statuses[dag_id]
+ else:
Review Comment:
I've demoted this log to debug. Thanks for pointing that out!
--
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]