abhijeets25012-tech commented on code in PR #75263:
URL: https://github.com/apache/airflow/pull/75263#discussion_r4380327277


##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -603,10 +603,19 @@ def _task_concurrency_allows_execution(
         task_id = task_instance.task_id
         run_id = task_instance.run_id
 
-        serialized_dag = self.scheduler_dag_bag.get_dag_for_run(
-            dag_run=task_instance.dag_run,
-            session=session,
-        )
+        try:
+            serialized_dag = self.scheduler_dag_bag.get_dag_for_run(
+                dag_run=task_instance.dag_run,
+                session=session,
+            )
+        except DBAPIError:
+            raise

Review Comment:
   Good catch. I will add a test modeled on 
`test_schedule_all_dag_runs_reraises_db_errors` that exercises the `DBAPIError` 
re-raise from `_task_concurrency_allows_execution`, so the existing transaction 
retry behavior stays covered.



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