[OpenStack-Infra] Should we use pip install --user ... in CI?
Sorin Sbarnea
ssbarnea at redhat.com
Thu Mar 19 09:26:23 UTC 2020
As I have a few pip tickets that I am closely monitoring two new interesting commends came at:
https://github.com/pypa/pip/issues/1668#issuecomment-600819050
In the past I used --user to install deps w/o messing the system package during the last year I went more and more often into very weird issues related to use of --user.
Basically I ended with the conclusion that --user approach is not much better than messing the system and only a real virtualenv is reliable.
I know that we already had talks about migrating zuul-jobs to install tools inside virtualenvs but this did not happen yet.
I was told that the idea was to install each tool into each own virtulaenv in order to better isolate it from conflicts with others but I have some concerns regarding :
a) making very hard or even impossible to use multiple tools in the same script, as they would exist in different envs.
b) extra footprint on disk and install time.
Do we really expect to have conflicts between lets say `tox` or `bindep`? I really doubt.
This is why I would like to propose a default shared virtualenv to be used but allowing user to override the venv name.
If we would have a "default" virtualenv at a specific location, it would be very easy to activate it at the start of each script.
There are lots of places in tripleo* where pip --user is used and before trying to propose any changes there, I would like to know where are we going towards with zuul-jobs as I would like to avoid divergence in behaviours.
Thanks
Sorin Sbarnea
More information about the OpenStack-Infra
mailing list