jceresini opened a new issue #19902:
URL: https://github.com/apache/airflow/issues/19902


   ### Apache Airflow version
   
   2.2.2 (latest released)
   
   ### Operating System
   
   MacOS 11.6.1
   
   ### Versions of Apache Airflow Providers
   
   $ pip freeze | grep airflow
   apache-airflow==2.2.2
   apache-airflow-providers-celery==2.1.0
   apache-airflow-providers-ftp==2.0.1
   apache-airflow-providers-http==2.0.1
   apache-airflow-providers-imap==2.0.1
   apache-airflow-providers-sqlite==2.0.1
   
   ### Deployment
   
   Other
   
   ### Deployment details
   
   `airflow standalone`
   
   ### What happened
   
   Exception raised :     
   
   ```
   raise DuplicateTaskIdFound(f"Task id '{key}' has already been added to the 
DAG")
   airflow.exceptions.DuplicateTaskIdFound: Task id 'do_all_things.do_thing__1' 
has already been added to the DAG
   ```
   
   ### What you expected to happen
   
   _No response_
   
   ### How to reproduce
   
   * Add the following python file to the `dags` folder:
   
   ```python
   from datetime import datetime
   
   from airflow.decorators import dag, task, task_group
   
   
   @dag(start_date=datetime(2023, 1, 1), schedule_interval="@once")
   def test_dag_1():
       @task
       def start():
           pass
   
       @task
       def do_thing(x):
           print(x)
   
       @task_group
       def do_all_things():
           for i in range(5):
               do_thing(i)
   
       @task
       def end():
           pass
   
       start() >> do_all_things() >> end()
   
   
   test_dag_1()
   ```
   
   * Start airflow by running `airflow standalone`
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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