ephraimbuddy opened a new pull request, #32351: URL: https://github.com/apache/airflow/pull/32351
Currently, you must instantiate a classic operator or call a decorated operator inside the context manager before it will link up with the context manager. For example, tasks 1 and 2 below will be outside the group1 context: ``` task1 = BashOperator(task_id="task1", bash_command="echo task1") task2 = BashOperator(task_id="task2", bash_command="echo task2") with TaskGroup('group1'): task1 >> task2 ``` This PR addresses the above such that when you do that, the tasks will be inside the group1 context. For a single task, you can do: ``` task1 = BashOperator(task_id="task1", bash_command="echo task1") with TaskGroup('group1') as scope: scope.add(task1) ``` -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org