dstandish commented on code in PR #25175:
URL: https://github.com/apache/airflow/pull/25175#discussion_r925771460
##########
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:
_really_, maybe we don't even need to maintain backcompat because it's just
UI, and there's no promise that the UI doesn't change -- e.g. when we removed
tree view and replaced with grid. so since in theory we can freely remove this
view and replace it with something else, it seems it would follow that we can
also remove the pluggability?
--
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]