yuqian90 opened a new pull request #11119:
URL: https://github.com/apache/airflow/pull/11119


   This PR is cherry-picked from #10153. It makes `TaskGroup` work with 
v1-10-test so that we can encourage more people to start using `TaskGroup`.
   (`TaskMixin` was also cherry-picked from #10930).
   
   Limitations:
   - Only `www_rbac/views.py` and `graph.html` works with `TaskGroup`. So users 
will only be use TaskGroup in Graph View if they have `rbac = True` under  
`[webserver]` in `airflow.cfg`. This is because `www/views.py` and graph.html 
has too many differences against the master branch, making it hard to merge. If 
`TaskGroup` is used in DAGs but the webserver is not rbac, the Graph View will 
not break, it'll just appear that `TaskGroup` was never used. All tasks will 
appear on the original DAG normally.
   
   
   
   
   This was the original commit message in #10153:
   
   This PR introduces `TaskGroup`, which is a simple UI task grouping concept. 
   
   What this PR does:
   - TaskGroups can be collapsed/expanded in Graph View when clicked
   - TaskGroups can be nested
   - TaskGroups can be put upstream/downstream of tasks or other TaskGroups 
with `>>` and `<<` operators
   - Search box, hovering, focusing in Graph View treats TaskGroup properly. 
E.g. searching for tasks also highlights TaskGroup that contains matching 
task_id. When TaskGroup is expanded/collapsed, the affected TaskGroup is put in 
focus and moved to the centre of the graph.
   
   What this PR does not do:
   - This PR does not change or remove `SubDagOperator`. Although `TaskGroup` 
is intended as an alternative for `SubDagOperator`, deprecating 
`SubDagOperator` will need to be discussed/implemented in the future.
   - This PR only implemented `TaskGroup` handling in the Graph View. In places 
such as Tree View, it will look like as-if `TaskGroup` does not exist and all 
tasks are in the same flat DAG.
   
   GitHub Issue: https://github.com/apache/airflow/issues/8078
   AIP: 
https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-34+TaskGroup%3A+A+UI+task+grouping+concept+as+an+alternative+to+SubDagOperator
   
   This is the example_task_group that this PR adds:
   
![image](https://github.com/yuqian90/airflow/raw/gif_for_demo/airflow/www/static/screen-shot-short.gif)


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to