ShousenZHANG commented on issue #73710: URL: https://github.com/apache/airflow/issues/73710#issuecomment-5832343665
I'd like to take this one. The cause is that `_collect_relatives` in `airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py` writes its results straight back into `normal_task_ids` / `mapped_tasks_tuples`. With both flags set, the upstream pass runs first and grows those sets, so the downstream pass then starts from the selected task's ancestors as well and picks up their other descendants — `other` in your example. The fix is to run both directions from a snapshot of the originally requested tasks and take the union, which is what the `dag_run_id is None` branch in the same function already gets from `dag.partial_subset(include_upstream=..., include_downstream=...)`. I'll add a regression test built from the Dag in your report that clears `a` with both flags and asserts `other` is not selected. PR shortly. -- 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]
