You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2024/08/01 09:52:28 UTC

Re: [PR] ensure xcom is not expanded when include_xcom is set to False [airflow]

uranusjr commented on code in PR #41177:
URL: https://github.com/apache/airflow/pull/41177#discussion_r1699866995


##########
airflow/models/expandinput.py:
##########
@@ -208,9 +208,12 @@ def iter_references(self) -> Iterable[tuple[Operator, str]]:
     def resolve(
         self, context: Context, session: Session, *, include_xcom: bool = True
     ) -> tuple[Mapping[str, Any], set[int]]:
+        from airflow.models.xcom_arg import XComArg
+
         data = {
             k: self._expand_mapped_field(k, v, context, session=session, include_xcom=include_xcom)
             for k, v in self.value.items()
+            if include_xcom or not isinstance(v, XComArg)

Review Comment:
   Shouldn’t the check be in `_expand_mapped_field` instead?



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