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



##########
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:
       Hmm
   
   ```pycon
   >>> import datetime
   >>> bool(datetime.timedelta())
   False
   ```
   
   so we should do `is not None` here instead to not accidentally allowing a 
zero-duration timedelta.




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