uranusjr commented on code in PR #32099:
URL: https://github.com/apache/airflow/pull/32099#discussion_r1244643233
##########
airflow/models/taskmixin.py:
##########
@@ -112,6 +115,31 @@ def __rlshift__(self, other: DependencyMixin |
Sequence[DependencyMixin]):
self.__rshift__(other)
return self
+ def set_setup_teardown_ctx_dependencies(self, other: DependencyMixin |
Sequence[DependencyMixin]):
+ if not SetupTeardownContext.active:
+ return
+ from airflow.models.xcom_arg import PlainXComArg
+
+ op1 = self
+ if isinstance(self, PlainXComArg):
+ op1 = self.operator
+ if getattr(op1, "is_setup") or getattr(op1, "is_teardown"):
Review Comment:
Would it be better to check whether `op1` is an AbstractOperator here
instead? (Same for `other` below)
--
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]