You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/02/12 15:58:31 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #13479: Added taskgroup decorator

kaxil commented on a change in pull request #13479:
URL: https://github.com/apache/airflow/pull/13479#discussion_r575325492



##########
File path: airflow/utils/task_group.py
##########
@@ -95,8 +109,23 @@ def __init__(
             self.used_group_ids = self._parent_group.used_group_ids
 
         self._group_id = group_id
-        if self.group_id in self.used_group_ids:
-            raise DuplicateTaskIdFound(f"group_id '{self.group_id}' has already been added to the DAG")
+        # if given group_id already used assign suffix by incrementing largest used suffix integer
+        # Example : task_group ==> task_group__1 -> task_group__2 -> task_group__3
+        if group_id in self.used_group_ids:
+            base = re.split(r'__\d+$', group_id)[0]
+            print([(i, type(i)) for i in self.used_group_ids])

Review comment:
       We don't want a print statement here I think -- (maybe a remnant od debugging)
   
   




----------------------------------------------------------------
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:
users@infra.apache.org