uranusjr commented on a change in pull request #21495:
URL: https://github.com/apache/airflow/pull/21495#discussion_r805950187
##########
File path: airflow/models/mappedoperator.py
##########
@@ -196,6 +196,9 @@ class MappedOperator(AbstractOperator):
upstream_task_ids: Set[str] = attr.ib(factory=set, init=False)
downstream_task_ids: Set[str] = attr.ib(factory=set, init=False)
+ inlets: list = attr.ib(factory=list)
+ outlets: list = attr.ib(factory=list)
Review comment:
I think these should be properties. Also probably don’t need to be
declared in AbstractOperator?
##########
File path: airflow/models/mappedoperator.py
##########
@@ -196,6 +196,9 @@ class MappedOperator(AbstractOperator):
upstream_task_ids: Set[str] = attr.ib(factory=set, init=False)
downstream_task_ids: Set[str] = attr.ib(factory=set, init=False)
+ inlets: list = attr.ib(factory=list)
+ outlets: list = attr.ib(factory=list)
Review comment:
Yeah and populate the partial_kwargs key in `BaseOperator.partial` and
`_TaskDecorator.map`.
##########
File path: airflow/decorators/base.py
##########
@@ -309,6 +309,8 @@ def map(self, **kwargs) -> XComArg:
partial_kwargs.get("retry_delay", DEFAULT_RETRY_DELAY),
)
partial_kwargs.setdefault("executor_config", {})
+ partial_kwargs.setdefault("inlets", [])
+ partial_kwargs.setdefault("outlets", [])
Review comment:
Should these be None?
##########
File path: airflow/models/taskinstance.py
##########
@@ -1836,7 +1838,7 @@ def get_template_context(
params.update(task.params)
if conf.getboolean('core', 'dag_run_conf_overrides_params'):
self.overwrite_params_with_dag_run_conf(params=params,
dag_run=dag_run)
- validated_params = task.params = params.validate()
+ validated_params = params.validate()
Review comment:
Was setting `task.params` here unintended or simply unnecessary?
--
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]