BasPH commented on a change in pull request #6549: [AIRFLOW-5880] Enforce
unique task ids
URL: https://github.com/apache/airflow/pull/6549#discussion_r345057908
##########
File path: airflow/models/dag.py
##########
@@ -1190,13 +1189,8 @@ def add_task(self, task):
task.end_date = min(task.end_date, self.end_date)
if task.task_id in self.task_dict:
Review comment:
IMO it should. I often see it going wrong with for loops where people forget
to make unique task ids. E.g.:
```python
for i in range(5):
DummyOperator(task_id="task")
```
In this case, currently no warning/error is given an only the last defined
task is saved. I think enforcing unique task ids here would be a good thing.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services