itayweb commented on code in PR #58102:
URL: https://github.com/apache/airflow/pull/58102#discussion_r2581770049
##########
airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:
##########
@@ -55,21 +60,23 @@ def _patch_ti_validate_request(
session: SessionDep,
map_index: int | None = -1,
update_mask: list[str] | None = Query(None),
-) -> tuple[SerializedDAG, list[TI], dict]:
+) -> tuple[SerializedDAG, list[TaskInstance], dict]:
dag = get_latest_version_of_dag(dag_bag, dag_id, session)
if not dag.has_task(task_id):
raise HTTPException(status.HTTP_404_NOT_FOUND, f"Task '{task_id}' not
found in DAG '{dag_id}'")
query = (
- select(TI)
- .where(TI.dag_id == dag_id, TI.run_id == dag_run_id, TI.task_id ==
task_id)
- .join(TI.dag_run)
- .options(joinedload(TI.rendered_task_instance_fields))
+ select(TaskInstance)
+ .where(
+ TaskInstance.dag_id == dag_id, TaskInstance.run_id == dag_run_id,
TaskInstance.task_id == task_id
+ )
+ .join(TaskInstance.dag_run)
+ .options(joinedload(TaskInstance.rendered_task_instance_fields))
)
Review Comment:
You are right, my mistake
--
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]