yuqian90 commented on pull request #12312: URL: https://github.com/apache/airflow/pull/12312#issuecomment-726535906
That being said, I wasn't super aware of the feature of dynamically generating unique task_id when `@task` decorator is used. Now looking at the code a bit more, I have some concerns with using the dynamic task_id feature too much in production DAGs which may evolve incrementally. For example, if there are many `@task` decorated tasks without explicitly given `task_id`. Their task_ids will be generated sequentially: task__1, task__2, task__3, etc. After the DAG goes into production, one day someone inserts a new task before `task__2`. The task_ids after that will all be shifted forward by one place. This is going to produce `task__1, task__2, task__3, task__4`. But at this point the task__3 is no longer the same `task__3` as before. This is going to cause confusion when looking at historical DagRuns. E.g. history, log files, etc. I think we should make it clear somewhere that the dynamic task_id feature should be used carefully if the DAG is expected to change in the future. ---------------------------------------------------------------- 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]
