This is an automated email from the ASF dual-hosted git repository.
jedcunningham pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-0-test by this push:
new 025c4c967ad [v3-0-test] Fix scheduler heartbeat timeout failures with
``DetachedInstanceError`` (#53838) (#53858)
025c4c967ad is described below
commit 025c4c967ad7b3b51a9f153642cdd45bcbdb24f9
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Aug 1 00:58:04 2025 -0600
[v3-0-test] Fix scheduler heartbeat timeout failures with
``DetachedInstanceError`` (#53838) (#53858)
(cherry picked from commit 94580537f56a2123f103640aaa6c87b4462c1b30)
Co-authored-by: Kaxil Naik <[email protected]>
---
airflow-core/src/airflow/jobs/scheduler_job_runner.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airflow-core/src/airflow/jobs/scheduler_job_runner.py
b/airflow-core/src/airflow/jobs/scheduler_job_runner.py
index 0fa598be412..b4aa4757716 100644
--- a/airflow-core/src/airflow/jobs/scheduler_job_runner.py
+++ b/airflow-core/src/airflow/jobs/scheduler_job_runner.py
@@ -2272,7 +2272,7 @@ class SchedulerJobRunner(BaseJobRunner, LoggingMixin):
task_instances_without_heartbeats = session.scalars(
select(TI)
.options(selectinload(TI.dag_model))
- .options(selectinload(TI.dag_run))
+
.options(selectinload(TI.dag_run).selectinload(DagRun.consumed_asset_events))
.options(selectinload(TI.dag_version))
.with_hint(TI, "USE INDEX (ti_state)", dialect_name="mysql")
.join(DM, TI.dag_id == DM.dag_id)