vemikhaylov commented on code in PR #29608:
URL: https://github.com/apache/airflow/pull/29608#discussion_r1141083330


##########
airflow/models/baseoperator.py:
##########
@@ -1119,6 +1121,12 @@ def set_xcomargs_dependencies(self) -> None:
                 arg = getattr(self, field)
                 XComArg.apply_upstream_relationship(self, arg)
 
+    def iter_xcom_dependencies(self) -> Iterator[tuple[Operator, str]]:
+        """Upstream dependencies that provide XComs used by this operator."""
+        from airflow.models.xcom_arg import XComArg
+
+        yield from XComArg.iter_xcom_references(self)

Review Comment:
   Is it a question why we need to define a method for that instead of calling 
`XComArg.iter_xcom_references` directly? As I see that, when we look at a 
`task` and want to understand, which XComs it depends on, 
`XComArg.iter_xcom_references(task)` seems to me like a lower level detail of 
implementation. Something similar happens in the mapped operator:
   
   
https://github.com/apache/airflow/blob/3f6b5574c61ef9765d077bdd08ccdaba14013e4a/airflow/models/mappedoperator.py#L638-L643



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