potiuk commented on code in PR #44540:
URL: https://github.com/apache/airflow/pull/44540#discussion_r1864964385
##########
airflow/models/taskinstance.py:
##########
@@ -1557,33 +1531,16 @@ def _update_rtif(ti, rendered_fields, session: Session
= NEW_SESSION):
RenderedTaskInstanceFields.delete_old_records(ti.task_id, ti.dag_id,
session=session)
-def _coalesce_to_orm_ti(*, ti: TaskInstancePydantic | TaskInstance, session:
Session):
- from airflow.models.dagrun import DagRun
- from airflow.serialization.pydantic.taskinstance import
TaskInstancePydantic
-
- if isinstance(ti, TaskInstancePydantic):
- orm_ti = DagRun.fetch_task_instance(
- dag_id=ti.dag_id,
- dag_run_id=ti.run_id,
- task_id=ti.task_id,
- map_index=ti.map_index,
- session=session,
- )
- if TYPE_CHECKING:
- assert orm_ti
- ti, pydantic_ti = orm_ti, ti
- _set_ti_attrs(ti, pydantic_ti)
- ti.task = pydantic_ti.task
+def _coalesce_to_orm_ti(*, ti: TaskInstance, session: Session):
Review Comment:
We will be able to remove it .. but in a follow up PR.
--
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]