potiuk commented on issue #19045: URL: https://github.com/apache/airflow/issues/19045#issuecomment-946100465
Also - following the discussion https://apache-airflow.slack.com/archives/CQ9QHSFQX/p1634550158070300 It seems that we have a little "destructive" behaviour of "initialize-local-virtualenv" that could be corrected along the way. Airflow, by default stores all "dynamically" generated stuff (logs, sqlite database, configuration) in `AIRFLOW_HOME` environment variable. If you do not happen to have `AIRFLOW_HOME` set, then it will fall-back to `${HOME}/airflow`. While this is pretty reasonable for "user" installation, it might get very nasty during development, when you happen to checkout SOURCES of AIrflow in ${HOME} dir - which might happen if you are "fresh" developer where you have not learned not to check-out your code directly in the HOME dir (this is kinda bad practice - a lof of tools does somewhat similar approach as airflow and it's all too-easy to get some nasty side effect): ``` cd ${HOME} git checkout https://github.com/apache/airflow.git ``` Then you end up with sources of Airflow checked out to `${HOME}/airflow` - which is the very place where dynamic configuration/dbs/logs etc of Airflow are generated. What's more - `initialize-virtualenv` command actually DELETES all the content of that "${AIRFLOW_HOME}" (it warns that it does it, but the warning might be easily not correlated with the fact that you have Airflow checked out in this directory. I think Breeze should ERROR OUT if you try to run "initialize-virtualenv" and your checked out sources from where you run Breeze are in the directory about to be deleted. Moreover, I think Breeze shoudl also WARN the user always if the source code of airflow (And Breeze) is the same as ${AIRFLOW_HOME} - because this might lead to some unexpected behaviours if the dynamically generated content by airflow overrides some of the files in sources. We already have those auto-generated files mostly added to .gitignore, but this might not be sustainable in the future. -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org