sjyangkevin commented on code in PR #74548:
URL: https://github.com/apache/airflow/pull/74548#discussion_r4241952463
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:
##########
@@ -1090,19 +1090,19 @@ def post_clear_task_instances(
# Unmapped tasks are expressed in their task_ids (without map_indexes)
normal_task_ids = {t for t in task_markers_to_clear if not
isinstance(t, tuple)}
- def _collect_relatives(run_id: str, direction: Literal["upstream",
"downstream"]) -> None:
+ def _find_relatives(
+ run_id: str, direction: Literal["upstream", "downstream"]
+ ) -> Collection[str | tuple[str, int]]:
Review Comment:
`_find_relatives` now takes the two sets as arguments instead of reading
them from the enclosing scope. Both calls visibly receive the same requested
selection, and it is updated only after both have returned. While there, I
moved the `find_relevant_relatives` import to the top of the module, next to
the other `taskinstance` imports the route already uses.
--
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]