potiuk commented on pull request #19189:
URL: https://github.com/apache/airflow/pull/19189#issuecomment-950381532


   Actually. I made it works with "virtualenv-clone" approach (so approach 
number 3).
   
   * by default 'clone_airflow_virtualenv' is set to True (to maintain 
backwards compatibility of the behaviour in our base image) where we use 
virtualenv now
   * however `clone_airflow_virtualenv=True` only performs the clone when:
      * no `python=` is used in VirtualenvOperator
      * airflow actualy is installed via Virtualenv
      * --system-site-packages are ignored in this case (cloning virtualenv 
automatically clones all packages in airflow venv so it makes no sense to add 
system-site-packages anyway)
   
   If Airflow is installed as system/user package or when someone specified 
`python=` in VirtualEnv, an empty virtualenv is created (possibly with 
--system-site-packages - similarly as before.
   
   Let me know what you think about this approach - I think it is as "close" as 
it can get to expected behaviour and as little potentialy disruptive as 
possible (I think the case where someone had virtualenv with airflow and no 
dill/airflow specified in requirements, it would not not work anyway so this is 
not really breaking change - it fixes a case which was broken and 
non-functional.


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