bryzgaloff commented on issue #29366:
URL: https://github.com/apache/airflow/issues/29366#issuecomment-1432666361
Hi @m1racoli thank you for reporting an issue :+1: I have encountered the
same limitation which was surprising to me. I agree that `default_args` should
keep working for dynamic tasks mapping and do it the same way as for regular
operators: applied only when needed for a particular operator based on its
signature. Probably, `default_args` are simply copied into `expand`'s too broad
`**mapped_kwargs` signature which causes an issue.
**As a quick potential workaround**, you may wrap a mapped operator into a
`TaskGroup` with `default_args={}`, because here is what [docs
say](https://airflow.apache.org/docs/apache-airflow/2.5.1/core-concepts/dags.html#taskgroups):
> `TaskGroup` also supports `default_args` like DAG, it will **overwrite the
`default_args` in DAG level**
I have _not_ tested myself but accidentally noticed this in the
documentation, so if you have a chance to try it out, please let me know if it
works.
--
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]