exploy commented on a change in pull request #4156: [AIRFLOW-3314] Changed auto
inlets feature to work as described
URL: https://github.com/apache/incubator-airflow/pull/4156#discussion_r231892080
##########
File path: airflow/lineage/__init__.py
##########
@@ -110,26 +111,32 @@ def wrapper(self, context, *args, **kwargs):
for i in inlets]
self.inlets.extend(inlets)
- if self._inlets['auto']:
- # dont append twice
- task_ids = set(self._inlets['task_ids']).symmetric_difference(
- self.upstream_task_ids
- )
- inlets = self.xcom_pull(context,
- task_ids=task_ids,
- dag_id=self.dag_id,
- key=PIPELINE_OUTLETS)
- inlets = [item for sublist in inlets if sublist for item in
sublist]
- inlets = [DataSet.map_type(i['typeName'])(data=i['attributes'])
- for i in inlets]
- self.inlets.extend(inlets)
-
- if len(self._inlets['datasets']) > 0:
- self.inlets.extend(self._inlets['datasets'])
+ if self._inlets["auto"]: # Performs a tree traversal, starting with
the current task. If outlets
Review comment:
Looks like, it should be multiline docsting
https://www.python.org/dev/peps/pep-0257/#multi-line-docstrings
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services