You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "subuserzero (via GitHub)" <gi...@apache.org> on 2023/02/23 21:17:46 UTC

[GitHub] [airflow] subuserzero commented on issue #29366: default_args feature incompatible with Dynamic Task Mapping

subuserzero commented on issue #29366:
URL: https://github.com/apache/airflow/issues/29366#issuecomment-1442444585

   > **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.
   
   That did not seem to work for me, but replacing the `default_args` of the DAG inside the task-group definition with an empty dict seems to get past the TypeError:
   
       @task_group(group_id='foo_group', dag=<dag-ref>)
       def foo_group():
           dag.default_args = {}
           ....
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org