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/02 09:03:44 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #21930: Only allow mapping against return value XCom

uranusjr commented on a change in pull request #21930:
URL: https://github.com/apache/airflow/pull/21930#discussion_r817481136



##########
File path: airflow/models/mappedoperator.py
##########
@@ -255,7 +271,6 @@ def __repr__(self):
     def __attrs_post_init__(self):
         from airflow.models.xcom_arg import XComArg
 
-        prevent_duplicates(self.partial_kwargs, self.mapped_kwargs, fail_reason="mapping already partial")

Review comment:
       This is moved from `MappedOperator`’s init to `OperatorPartial.apply()` because this validation is not needed when a `MappedOperator` is created from deserialisation, only in the DAG file (user input). This also matches the implementation of mapped `@task` (in `decorators/base.py` above).




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