You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Print error in Airflow UI when a DAG with duplicate DAG_id as another DAG is present #17861
I would like to see an error in Airflow UI (like "Broken DAG: duplicate DAG-id") when a DAG is present that has the same (non-unique) DAG-id as another DAG. Currently, Airflow silently ignores one of these duplicated DAGs.
Use case / motivation
For users that either knowingly or unknowingly have multiple DAGs with the same DAG-id (which could happen especially in the case of dynamically generating DAGs), unintended/weird functionality can result as Airflow tries to figure out which DAG is the right one. It is not clear how Airflow will choose, and if that choice can change each time it parses for DAG changes.
This is implemented on main and will ship in 3.4.0: when the same dag_id is registered from more than one file, the UI now shows a duplicate dag_id warning (#68791). If this doesn't cover your use case, comment here and we'll reopen.
Activity
boring-cyborg commentedon Aug 26, 2021
Thanks for opening your first issue here! Be sure to follow the issue template!
potiuk commentedon Aug 27, 2021
Seems like good idea - maybe you would try to contribute ti @ben-astro ? Might be a very useful contribution back.
siddharthvp commentedon Aug 27, 2021
I was taking a shot at this, but am unsure how it can be implemented correctly. We could have a function like:
but this would give a false-positive alert if a DAG was moved from file A to file B and by chance events occur in this sequence:
process A -> DAG moved to B -> process B
kaxil commentedon Oct 2, 2026
This is implemented on main and will ship in 3.4.0: when the same dag_id is registered from more than one file, the UI now shows a duplicate dag_id warning (#68791). If this doesn't cover your use case, comment here and we'll reopen.