dheerajturaga commented on code in PR #73087:
URL: https://github.com/apache/airflow/pull/73087#discussion_r4096883745
##########
task-sdk/src/airflow/sdk/definitions/dag.py:
##########
@@ -1177,6 +1177,22 @@ def _check_adjacent_tasks(task_id, current_task):
else:
path_stack.append(child_to_check)
+ task_group_dict = self.task_group.get_task_group_dict()
+ for task_group in task_group_dict.values():
+ try:
+ task_group.topological_sort(group_dict=task_group_dict)
Review Comment:
Thanks for the thorough repro. I agree this is out of scope here. Root
membership is recomputed on the filtered subset, so `partial_subset()` can turn
a non-root into a root and create a group-level cycle that doesn't exist in the
full Dag. Parse-time validation can't prevent that without rejecting far more
Dags. The fix belongs in the Grid/Graph ordering, which needs to tolerate
group-level cycles either way. I'll track this in #73678 as part of the "fix
the Grid/Graph 500" track and handle it in a separate PR.
---
Drafted-by: Claude Code (Opus 5.5); reviewed by @dheerajturaga before posting
--
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]