jason810496 opened a new pull request, #73439: URL: https://github.com/apache/airflow/pull/73439
# TS SDK: add task groups to the native Dag surface - **Depends on the PR for `feature/ts-sdk/order-only-edges` getting merged first** (only the last commit is new here). - **Diff for early review**: https://github.com/jason810496/airflow/compare/feature/ts-sdk/order-only-edges...feature/ts-sdk/task-groups - **next**: `feature/ts-sdk/dag-cycle-detection` ## Why Grouping is the third construct a native Dag needs after tasks and edges, and Python Dags use it everywhere. ## How - `dag.taskGroup(id)` opens a scope with the same `task` and `taskGroup` methods as the Dag, so nesting is the same call at every depth. - Each task id it declares carries the group prefix, matching Python's `prefix_group_id`. - `Node` is the type both a task reference and a group reference satisfy, so `before` and `after` take either. It is the counterpart of Python's `DAGNode` and the Go SDK's `airflow.Node`. ## What - `TaskGroupRef`, nesting to any depth, recorded as a tree for the serializer. - Tasks and groups share one id namespace, as they do in Python, so a Dag cannot hold both a task and a group called `staging`. - A group id containing the separator is rejected: nesting is what `taskGroup` is for. --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes, with help of Claude Code Opus 5 following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
