dstandish commented on a change in pull request #22641:
URL: https://github.com/apache/airflow/pull/22641#discussion_r839795836



##########
File path: airflow/models/mappedoperator.py
##########
@@ -278,6 +278,11 @@ def __attrs_post_init__(self):
         for k, v in self.partial_kwargs.items():
             if k in self.template_fields:
                 XComArg.apply_upstream_relationship(self, v)
+        if self.partial_kwargs.get('sla'):
+            raise AirflowException(
+                f"SLAs are unsupported with mapped tasks. Please set 
`sla=None` for task "
+                f"{self.task_id!r}."
+            )

Review comment:
       That's what I was thinking originally and is probably what would get my 
vote. But @ashb argued that it's better to force users to set `sla=None` 
because SLAs already have issues and adding a warning sortof makes them "more 
broken", as opposed to disallowing their use for this new class of task.
   
   I can see an argument for the fail because  (1) it's a new type of task so 
it's not gonna break anything existing and (2) we already have enough warnings, 
maybe it's better to force folks to fix so as not to create _more_ noise to 
filter through.




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