From 3b9935e780ecfd55254d4363b5556ba24e02b937 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Sun, 1 Sep 2024 16:32:55 +0200 Subject: [PATCH] Add backcompat check for executors that don't inherit BaseExecutor (#41906) (#41927) (cherry picked from commit f168d0aedbc73b86b1bb0e7fb38cad4ce5a66621) Co-authored-by: Daniel Standish <15932138+dstandish@users.noreply.github.com> --- airflow/jobs/scheduler_job_runner.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/airflow/jobs/scheduler_job_runner.py b/airflow/jobs/scheduler_job_runner.py index ba5f90c68b77..69789e9df9cc 100644 --- a/airflow/jobs/scheduler_job_runner.py +++ b/airflow/jobs/scheduler_job_runner.py @@ -1135,6 +1135,9 @@ def _run_scheduler_loop(self) -> None: for executor in self.job.executors: try: + # this is backcompat check if executor does not inherit from BaseExecutor + if not hasattr(executor, "_task_event_logs"): + continue with create_session() as session: self._process_task_event_logs(executor._task_event_logs, session) except Exception: