alex-astronomer commented on issue #17686:
URL: https://github.com/apache/airflow/issues/17686#issuecomment-931835280


   Sorry about the comment spam, I just keep figuring out more and more about 
this issue.  Here's what I've come up with from the research that I've done 
today.
   
   By doing `xcom_task2(date)` (if we're looking at the previous examples which 
define the tasks using the taskflow API), there is an implicit dependency being 
set for this case between `set_date >> xcom_task2`.  This was originally 
created as a response to this 
[issue](https://github.com/apache/airflow/issues/8054).  The reason that I 
don't like this can be traced back to PEP-20, [The Zen of 
Python](https://www.python.org/dev/peps/pep-0020/).
   
   I believe that it would make more sense within this context to not 
automatically set this dependency, even if it makes more sense logically to do 
so.  We know logically that in order to pull an XCOM from a task, that previous 
task which pushes the XCOM *must* have been run first.  So why not set that 
dependency automatically?
   
   The main diagram of the DAG and use case in the original post for this 
ticket gives the answer to that.  By implicitly setting the dependencies with 
`set_xcomarg_dependencies`, we get strange DAG behavior for more complicated 
DAGs, and more unnecessary dependencies.
   
   If we stick to explicitly setting the dependencies, that would require the 
user to logically understand the relationship between tasks and XCOMs but also 
falls more in line with Zen of Python guidelines about explicit vs. implicit.
   
   Thoughts?


-- 
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]


Reply via email to