ashb commented on code in PR #54505:
URL: https://github.com/apache/airflow/pull/54505#discussion_r2559458891


##########
task-sdk/src/airflow/sdk/definitions/taskgroup.py:
##########
@@ -247,14 +246,14 @@ def add(self, task: DAGNode) -> DAGNode:
         if isinstance(task, TaskGroup):
             if self.dag:
                 if task.dag is not None and self.dag is not task.dag:
-                    raise RuntimeError(
+                    raise ValueError(
                         "Cannot mix TaskGroups from different Dags: %s and %s",
                         self.dag,
                         task.dag,
                     )
                 task.dag = self.dag
             if task.children:
-                raise AirflowException("Cannot add a non-empty TaskGroup")
+                raise ValueError("Cannot add a non-empty TaskGroup")

Review Comment:
   I think this one is fine, as it would have been a dag import error before, 
so I can't see anything beyond the tiniest of edge cases that someone was 
catching this before.



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