seanghaeli commented on code in PR #70312:
URL: https://github.com/apache/airflow/pull/70312#discussion_r3678999802
##########
airflow-core/src/airflow/api_fastapi/execution_api/datamodels/taskinstance.py:
##########
@@ -390,6 +390,10 @@ def safe_extract_from_orm(cls, data: Any) -> Any:
else:
values["note"] = None
+ # A property rather than a column, so the loop above never picks it up.
+ if not insp.detached:
+ values["team_name"] = data.team_name
Review Comment:
The `team_name` here can be stale for up to 30 seconds:
The worker will now get `team_name` from here instead of from `ti_run()`.
`data.team_name` falls back to this cache, which only updates every 30 seconds:
https://github.com/apache/airflow/blob/682cf06525cd3f7006b8c1b46c42c7102d84373c/airflow-core/src/airflow/models/dag.py#L108-L109
I verified this happens locally on breeze, and is fixed here:
https://github.com/apache/airflow/blob/7c3e41b63083ce9648235e0a5107b8ff236c7af9/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py#L261-L266
by adding the following line:
```.options(*eager_load_teams(DR.dag_model))```
--
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]