You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/01 10:22:59 UTC

[GitHub] [airflow] ashb commented on a change in pull request #21815: Ensure a mappable operator's deps is a set, and convert BaseSensorOperator.deps to a class variable

ashb commented on a change in pull request #21815:
URL: https://github.com/apache/airflow/pull/21815#discussion_r816636698



##########
File path: airflow/models/mappedoperator.py
##########
@@ -284,7 +285,10 @@ def get_serialized_fields(cls):
     @staticmethod
     @cache
     def deps_for(operator_class: Type["BaseOperator"]) -> FrozenSet[BaseTIDep]:
-        return operator_class.deps | {MappedTaskIsExpanded()}
+        operator_deps = operator_class.deps
+        if not isinstance(operator_deps, collections.abc.Set):
+            raise UnmappableOperator(f"cannot map operator; f{operator_class}.deps must be a set")

Review comment:
       "deps must be defined as a class-level variable, not a property"?




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org