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 2022/08/01 23:46:53 UTC

[GitHub] [airflow] EdwardRadical commented on issue #25165: Dynamic Tasks inside of TaskGroup do not have group_id prepended to task_id

EdwardRadical commented on issue #25165:
URL: https://github.com/apache/airflow/issues/25165#issuecomment-1201848083

   Same core issue as https://github.com/apache/airflow/issues/23621.
   
   >This logic already exists; a @task-decorated task calls get_unique_task_id, which calls task_group.child_id. The root cause will be deeper than this.
   
   As far as I can tell this is not correct, this is the reason I found back when I opened it:
   
   > At the end of the day it seems that 
   > ```
   >         if task_group:
   >             self.task_id = task_group.child_id(task_id)
   > ```
   > Is only executed by inheritors of `BaseOperator`. `MappedOperator` does not inherit from it so it never does execute the line that would prefix correctly the task_id, hence the duplicate key error thrown later, when `self.dag.add_task` is called. Maybe a simple fix would be to add those two lines to `MappedOperator` too, although there are other places that fiddle with the task_id.


-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org