dstandish commented on code in PR #49097:
URL: https://github.com/apache/airflow/pull/49097#discussion_r2042299143
##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -867,7 +921,14 @@ def process_executor_events(
# Get task from the Serialized DAG
try:
- dag = dag_bag.get_dag(ti.dag_id)
+ dag = scheduler_dag_bag.get_dag(dag_run=ti.dag_run,
session=session)
+ cls.logger().error(
+ "DAG '%s' for task instance %s not found in
serialized_dag table",
+ ti.dag_id,
+ ti,
+ )
Review Comment:
i think in order to remove this kind of exception handling, we might need to
make the entities not nullable, and perhaps have cascade deletes etc because,
right now, most of the relationships are optional so e.g. mypy complains that
they might be None ---- and it's possible if it's not guaranteed by the
database.
--
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]