This is an automated email from the ASF dual-hosted git repository.
kaxilnaik 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 f69ecaec19d fixup! Support TaskInstanceHistory in log handlers (#51592)
f69ecaec19d is described below
commit f69ecaec19de5aab26e2cc47ce10cc735293bc9f
Author: Kaxil Naik <[email protected]>
AuthorDate: Wed Jul 2 22:39:59 2025 +0530
fixup! Support TaskInstanceHistory in log handlers (#51592)
---
airflow-core/src/airflow/models/taskinstancehistory.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/airflow-core/src/airflow/models/taskinstancehistory.py
b/airflow-core/src/airflow/models/taskinstancehistory.py
index 03c73e59aba..079d58efc09 100644
--- a/airflow-core/src/airflow/models/taskinstancehistory.py
+++ b/airflow-core/src/airflow/models/taskinstancehistory.py
@@ -114,6 +114,13 @@ class TaskInstanceHistory(Base):
foreign_keys=[dag_version_id],
)
+ dag_run = relationship(
+ "DagRun",
+ primaryjoin="TaskInstanceHistory.run_id == DagRun.run_id",
+ viewonly=True,
+ foreign_keys=[run_id],
+ )
+
def __init__(
self,
ti: TaskInstance,