abhishekbhakat commented on code in PR #54775:
URL: https://github.com/apache/airflow/pull/54775#discussion_r2318243252


##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -1350,7 +1350,11 @@ def _create_dag_runs(self, dag_models: 
Collection[DagModel], session: Session) -
         )
 
         for dag_model in dag_models:
-            dag = self.dagbag.get_dag(dag_model.dag_id, session=session)
+            try:
+                dag = self.dagbag.get_dag(dag_model.dag_id, session=session)
+            except Exception:

Review Comment:
   I can raise specifically for serialization error. Which I'll have to import 
in job runner.
   
   But I feel like broad exception handling is insurance against scheduler 
failure. 
   No matter what error arises, scheduler should never fail.
   
   More specific exception handling belongs in DAG parsing logic or DAG 
serialization methods.
   
   We can log the exception message. Let me know if you still think we should 
raise a specific exception.



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