jedcunningham commented on code in PR #25175:
URL: https://github.com/apache/airflow/pull/25175#discussion_r925695366


##########
airflow/models/dagbag.py:
##########
@@ -623,11 +623,12 @@ def _serialize_dag_capturing_errors(dag, session):
                 )
                 self.log.debug("Calling the DAG.bulk_sync_to_db method")
                 try:
+                    DAG.bulk_write_to_db(self.dags.values(), session=session)

Review Comment:
   Why are we flipping this order? I feel like I remember it was intentionally 
this way, but I can't remember why.



##########
airflow/serialization/serialized_objects.py:
##########
@@ -839,7 +882,21 @@ def deserialize_operator(cls, encoded_op: Dict[str, Any]) 
-> Operator:
     @classmethod
     def detect_dependencies(cls, op: Operator) -> Optional['DagDependency']:
         """Detects between DAG dependencies for the operator."""
-        return cls.dependency_detector.detect_task_dependencies(op)
+        dependency_detector = DependencyDetector()
+        custom_dependency_detector = conf.getimport('scheduler', 
'dependency_detector')
+        deps = set()
+        if not (custom_dependency_detector is None or 
type(dependency_detector) is DependencyDetector):
+            warnings.warn(
+                "Use of a custom dependency detector is deprecated. "
+                "Support will be removed in a future release.",
+                DeprecationWarning,
+            )
+            dep = custom_dependency_detector.detect_task_dependencies(op)
+            if dep:
+                deps.add(dep)
+        deps.update(dependency_detector.detect_task_dependencies(op))

Review Comment:
   Just checking, we should be calling both the custom and default one?



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