kaxil commented on code in PR #54972:
URL: https://github.com/apache/airflow/pull/54972#discussion_r2349754834


##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -909,13 +909,14 @@ def process_executor_events(
                 # Get task from the Serialized DAG
                 try:
                     dag = 
scheduler_dag_bag.get_dag_for_run(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,
-                    )
-                    if TYPE_CHECKING:
-                        assert dag
+                    if not dag:
+                        cls.logger().error(
+                            "DAG '%s' for task instance %s not found in 
serialized_dag table",
+                            ti.dag_id,
+                            ti,
+                        )
+                        raise

Review Comment:
   Empty raise?



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