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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to