dheerajturaga commented on issue #73678:
URL: https://github.com/apache/airflow/issues/73678#issuecomment-5819643098

   Another case, found by @shubhamraj-git while reviewing #73087 
(https://github.com/apache/airflow/pull/73087#discussion_r4084498696): a Dag 
whose group-level dependencies have **no** cycle can still get a 500 from 
Grid/Graph when the view is filtered.
   
   ```python
   with DAG("filter_cycle", schedule=None):
       with TaskGroup("g"):
           first = EmptyOperator(task_id="first")
           second = EmptyOperator(task_id="second")
           guard = EmptyOperator(task_id="guard")
           guard >> second
       bridge = EmptyOperator(task_id="bridge")
       first >> bridge >> second
   ```
   
   Unfiltered Grid/Graph return 200. With 
`root=g.first&include_downstream=true`, `partial_subset()` drops `g.guard`, so 
`g.second` becomes a root of `g`. The group-level edges then become `g ↔ 
bridge`, and both endpoints return 500. The same failure happens without #73087.
   
   So filtering can create group-level cycles even for Dags that pass any 
parse-time check. Whatever we decide on rejecting these Dags, the Grid/Graph 
ordering needs to tolerate group-level cycles rather than error out. I'll 
handle that 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]

Reply via email to