phi-friday commented on code in PR #41592:
URL: https://github.com/apache/airflow/pull/41592#discussion_r1723114616
##########
airflow/decorators/base.py:
##########
@@ -431,18 +431,29 @@ def _expand(self, expand_input: ExpandInput, *, strict:
bool) -> XComArg:
dag = task_kwargs.pop("dag", None) or DagContext.get_current_dag()
task_group = task_kwargs.pop("task_group", None) or
TaskGroupContext.get_current_task_group(dag)
- partial_kwargs, partial_params = get_merged_defaults(
+ default_args, partial_params = get_merged_defaults(
dag=dag,
task_group=task_group,
task_params=task_kwargs.pop("params", None),
task_default_args=task_kwargs.pop("default_args", None),
)
- partial_kwargs.update(
- task_kwargs,
- is_setup=self.is_setup,
- is_teardown=self.is_teardown,
- on_failure_fail_dagrun=self.on_failure_fail_dagrun,
- )
+ partial_kwargs: dict[str, Any] = {
+ "is_setup": self.is_setup,
+ "is_teardown": self.is_teardown,
+ "on_failure_fail_dagrun": self.on_failure_fail_dagrun,
+ }
+ base_signature = inspect.signature(BaseOperator)
+ ignore = {
+ "default_args",
+ "kwargs",
+ "do_xcom_push",
+ "multiple_outputs",
+ "params",
+ "task_concurrency",
+ }
Review Comment:
First, as I mentioned earlier, here's why I thought we should remove
`default_args`, `kwargs`, `multiple_outputs`, and `params`.
- `default_args`: This is the target we're working on right now.
- `kwargs`: A common name for a keyword argument.
- `multiple_outputs`: We use `self.multiple_outputs` in subsequent code.
- `params`: Already managed by `partial_params`.
and
- `task_concurrency`: is deprecated(will be replaced by
`max_active_tis_per_dag`)
- `do_xcom_push`: I'm actually not sure about `do_xcom_push` yet.
--
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]