meel-ayush commented on code in PR #76556:
URL: https://github.com/apache/airflow/pull/76556#discussion_r4680274224


##########
airflow-core/src/airflow/dag_processing/collection.py:
##########
@@ -696,6 +697,60 @@ def _reject_dags_with_unloadable_timetables(
     return accepted
 
 
+def _reject_cross_bundle_dag_id_collisions(
+    bundle_name: str,
+    dags: Collection[LazyDeserializedDAG],
+    import_errors: dict[tuple[str, str], str],
+    *,
+    session: Session,
+) -> list[LazyDeserializedDAG]:
+    """Drop Dags whose dag_id is already registered in another active bundle, 
recording an import error."""

Review Comment:
   First one parsed into `DagModel` wins. The second one gets rejected and 
logged as an import error.
   
   If the first bundle removes the Dag or is unconfigured, the row becomes 
stale (`is_stale=True`), which allows another bundle to take the 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