fat-catTW commented on PR #70051: URL: https://github.com/apache/airflow/pull/70051#issuecomment-5303102649
Thanks for the follow-up fix. The `ti.dag_model is None` fallback addresses the `AttributeError`, but I think there is still one edge case worth covering before this is safe to merge. `TaskInstance.dag_model` is defined with `innerjoin=True`. If `joinedload(TI.dag_model)` uses that inner join behavior, `DagRun.fetch_task_instances()` may filter out task instances that do not have a matching `DagModel` row. In that case the fallback in `DagUnpausedDep` would never run, because the TI would not be returned by the query at all. Could we either make this eager load explicitly use outer-join semantics, or add a regression test showing that `fetch_task_instances()` still returns the TI when `dag_model` is missing? It would also be good to add a test that verifies this actually avoids the extra per-task pause-check queries. -- 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]
