potiuk edited a comment on issue #20921:
URL: https://github.com/apache/airflow/issues/20921#issuecomment-1021297219


   Well. I thought a lot about it recently.
   
   I am still not entirely "sold" on the idea which I described in the issue. 
   
   This is especially afer comments of Niko in [This 
thread](https://apache-airflow.slack.com/archives/CQ9QHSFQX/p1642513096003800). 
   
   He expressed some concerns which pretty much mirrored very similar to what I 
had initially on mind when I wrote the 
https://github.com/apache/airflow/blob/main/dev/breeze/doc/adr/0003-bootstraping-virtual-environment.md
 ).
   
   I thought I am the only one who thinks the "bootstrapping" is better (for 
those reasons) - but Niko explained pretty much all the reasons I put in the 
ADR why bootstrapping is better. 
   
   Simply - while `pipx` is nice for installing stuff, it lacks in automated 
management and switching between branches. It will only install "one" 
installation and we really want to use the exact "breeze" version that comes 
with the actual sources (so for example when we checkout v2-2-test, we want to 
use Breeze that is installed there), when  we use (future) v2-3-test - we want 
to use Breeze version that is available in that branch. There are some "suffix" 
options but they are not easy to maintain and keep in check (and you have to 
remamber about using the right suffix in the right branch).
   
   So I am currently torn in half (but leaning towards leaving the 
Bootstrapping as default approach):
   
   1) `pipx` and multiple entrypoints are nice for installation and adding stuf 
on the PATH and are more "standard-ish" 
   2) `./Breeze2` bootstrapping is nicer to make sure that the version uou are 
using is "latest version that works for this branch"  and does not need ANY 
extra tool
   
   There are two serious dangers with `pipx`:
   
   * that the version you have in one branch will not work with another branch 
(very likely from the past experiences)
   * that even if you are in the same branch, you could have not installed the 
latest version of dependencies (and Breeze will fail) or that you have not 
installed it with `--editable` flag - which means that the code in the branch 
is different that what you installed. 
   
   Both are real dangers, and they will significantly introduce the likelihood 
that different users (especially the ones who are not experienced) will get 
Breeze not working and that they will raise support questions or (worse) that 
they will consider Breeze as buggy and will avoid using it or even will drop 
the idea of contributing to Airflow.
   
   The `./Breeze2` bootstrapping is free of those problems:
   
   * --editable mode is automatically used
   * latest dependencies are added when they were missing automatically 
   * your Breeze version is very tightly connecteect to the branch you are in
   
   Honestly, I think we can only go with the `pipx` solution if we have 
automated solutions to those problems. 
   
   This could be done by some automated check at the start of each command: 
   
   * whether we are installed in editable mode
   * whether all dependencies are installed
   * whether we are installed from the current branch 
   * fixing it or "failing" with the right instruction to the user on how to fix
   
   This is all possible to be implemented, but I have a feeiling that this will 
really outweight the benefits of using `pipx` in the first place. The 
complexity of such custom code is even bigger than the current `./Breeze2` 
bootstrapping script and somehow I have a feeling that the bootstrapping script 
is much more 'versatile' and "clener" because it is applied "before" and 
independently from Breeze code.
   
   I would love to hear more comments on that but I have not made up my mind 
yet.
   
   @uranusjr - WDYT?
   
   Also maybe some other Breeze users @dstandish @ephraimbuddy @kaxil - WDYT?


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