ashb commented on code in PR #31608: URL: https://github.com/apache/airflow/pull/31608#discussion_r1210164168
########## airflow/utils/task_group.py: ########## @@ -176,6 +177,10 @@ def _check_for_group_id_collisions(self, add_suffix_on_collision: bool): else: self._group_id = f"{base}__{suffixes[-1] + 1}" + def _update_default_args(self, parent_group: TaskGroup): + if parent_group.default_args: + self.default_args.update(parent_group.default_args) Review Comment: This will mutate default_args in place which we probably shouldn't do. I have memories of a bug in the past where this caused some odd behaviour in DAGs where someone did effecitvely this: ```python DEFAULT_ARGS= {...} with DAG(dag_id='dag1', default_args=DEFAULT_ARGS) as dag1: ... with DAG(dag_id='dag2', default_args=DEFAULT_ARGS) as dag2: ... ``` So we should do something like this? ```suggestion self.default_args = {**self.default_args, **parent_group.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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org