fat-catTW commented on code in PR #71767:
URL: https://github.com/apache/airflow/pull/71767#discussion_r3813297467


##########
airflow-core/src/airflow/serialization/definitions/dag.py:
##########
@@ -786,6 +786,19 @@ def _process_dagrun_deadline_alerts(
                         "deadline_alerts.deadline_created",
                         tags=prune_dict({"dag_id": self.dag_id, "team_name": 
team_name}),
                     )
+                else:
+                    required_dagrun_column = {
+                        SerializedReferenceModels.DagRunLogicalDateDeadline: 
"logical_date",
+                        SerializedReferenceModels.DagRunQueuedAtDeadline: 
"queued_at",
+                    }.get(type(deserialized_deadline_alert.reference))
+                    log.warning(
+                        "skipping deadline alert because the deadline 
reference evaluated to None",
+                        dag_id=self.dag_id,
+                        run_id=orm_dagrun.run_id,
+                        deadline_alert_id=deadline_alert.id,
+                        
reference_type=deserialized_deadline_alert.reference.reference_name,
+                        required_dagrun_column=required_dagrun_column,
+                    )

Review Comment:
   Good catch! Thanks for the review.
   I narrowed this warning to only `DagRunLogicalDateDeadline` and 
`DagRunQueuedAtDeadline`, since those are the references that read nullable 
DagRun timestamp columns.



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