Vamsi-klu opened a new pull request, #64988: URL: https://github.com/apache/airflow/pull/64988
Task instance lookups can collide across DAGs when different DAGs use the same `run_id`, `task_id`, and `map_index`. In that case the lookup path can return multiple rows instead of a single task instance, which makes scheduler-side retrieval unstable and can fail execution paths that expect one match. This change restores DAG scoping for that lookup so task instance retrieval remains unique even when run IDs overlap across DAGs, which is a normal and supported case. A regression test covers the cross-DAG collision scenario directly. closes: #64957 ### Validation - `breeze run pytest airflow-core/tests/unit/models/test_taskinstance.py::TestTaskInstance::test_get_task_instance_filters_by_dag_id -xvs` - `prek run --from-ref main --stage pre-commit` - `prek run --from-ref main --stage manual` --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Codex GPT-5 Generated-by: Codex GPT-5 following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
