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


##########
airflow/decorators/base.py:
##########
@@ -382,7 +382,15 @@ def expand(self, **map_kwargs: OperatorExpandArgument) -> 
XComArg:
         prevent_duplicates(self.kwargs, map_kwargs, fail_reason="mapping 
already partial")
         # Since the input is already checked at parse time, we can set strict
         # to False to skip the checks on execution.
-        return self._expand(DictOfListsExpandInput(map_kwargs), strict=False)
+        if self.is_teardown:
+            if "trigger_rule" in self.kwargs:
+                raise ValueError("Trigger rule not configurable for teardown 
tasks.")
+            self.kwargs.update(trigger_rule=TriggerRule.ALL_DONE_SETUP_SUCCESS)

Review Comment:
   This should probably be in `__attrs_post_init__`? Also covers the non-mapped 
case.



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