reubenvanammers 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_r232089644
##########
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:
Sure! I wanted to keep the documentation as is since I was writing this PR
to match the features of the documentation. On hindsight, since since it does
add behaviour not fully covered by the existing docstring, it makes sense to
move it into the docstring and clear the behaviour up a little.
----------------------------------------------------------------
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