Vamsi-klu commented on code in PR #73087:
URL: https://github.com/apache/airflow/pull/73087#discussion_r4002487377


##########
task-sdk/src/airflow/sdk/definitions/dag.py:
##########
@@ -1177,6 +1177,16 @@ 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()

Review Comment:
   This is a user-facing break. Dags that parse, schedule, and run today 
(Grid/Graph 500s, tasks still execute) become import errors. Task SDK ships in 
airflow-core. Add airflow-core/newsfragments/73087.significant.rst. Do not ship 
a parse-time kill switch as a silent behavior change.



##########
airflow-core/docs/core-concepts/dags.rst:
##########
@@ -585,6 +585,11 @@ Dependency relationships can be applied across all tasks 
in a TaskGroup with the
 
     group1() >> task3
 
+Dependencies between sibling tasks and TaskGroups must remain acyclic when 
each TaskGroup is treated as a
+single unit. For example, if any task in ``group1`` is upstream of a task in 
``group2``, another task in

Review Comment:
   This sentence is stronger than the code. The group projection only sees 
cross-boundary edges that land on a group's roots (get_roots()). 
Counterexample: g1 has a >> b, g2 has c, then a >> c and c >> b. A g1 task is 
upstream of g2 and a g2 task is upstream of g1, and there is no parse error, 
because c >> b hits a non-root. The task graph is also acyclic, so the old DFS 
misses it too.
   
   Reword to the actual rule: sibling tasks and TaskGroups must be orderable 
when each TaskGroup is treated as a unit, counting only edges into a group's 
entry tasks. Or drop the "any task" example.



-- 
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]

Reply via email to