sdebruyn commented on code in PR #22641:
URL: https://github.com/apache/airflow/pull/22641#discussion_r1072439196
##########
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:
The issue with enforcing this, is that if you have a dag of a few tasks and
it has just one mapped task, that you cannot set an SLA in default_args
anymore. The behaviour of setting it to None would have helped there. Putting
`sla=None` in your task decorator kwargs doesn't help.
--
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]