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


##########
airflow/models/mappedoperator.py:
##########
@@ -646,6 +643,8 @@ def unmap(self, resolve: None | Mapping[str, Any] | 
tuple[Context, Session]) ->
             # is prepended, and '__N' appended to deduplicate). This is hacky,
             # but better than duplicating the whole mangling logic.
             op.task_id = self.task_id
+            op.is_setup = kwargs.pop("is_setup", False)
+            op.is_teardown = kwargs.pop("is_teardown", False)

Review Comment:
   `kwargs` is already passed to the operator’s constructor above, the pop 
calls should happen before that.



##########
airflow/models/mappedoperator.py:
##########
@@ -646,6 +643,8 @@ def unmap(self, resolve: None | Mapping[str, Any] | 
tuple[Context, Session]) ->
             # is prepended, and '__N' appended to deduplicate). This is hacky,
             # but better than duplicating the whole mangling logic.
             op.task_id = self.task_id
+            op.is_setup = kwargs.pop("is_setup", False)
+            op.is_teardown = kwargs.pop("is_teardown", False)

Review Comment:
   `kwargs` is already passed to the operator’s constructor above, the pop 
calls should happen before that.



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