-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix dh-virtualenv packages build, avoid updating pip to latest v10.0 #549
Conversation
@armab Just did a bit more digging into the circle report (Hate when I have to download the output). Answered my own question. |
Good catch - I confirmed this nasty virtualenv env behavior locally. vagrant@local$ virtualenv footest
New python executable in /data/st2docs/footest/bin/python
Installing setuptools, pip, wheel...done.
vagrant@local$ footest/bin/pip --version
pip 10.0.0 from /data/st2docs/footest/local/lib/python2.7/site-packages/pip (python 2.7)
vagrant@local$ virtualenv --no-download footest2
New python executable in /data/st2docs/footest2/bin/python
Installing setuptools, pip, wheel...done.
vagrant@local$ footest2/bin/pip --version
pip 9.0.1 from /data/st2docs/footest2/local/lib/python2.7/site-packages (python 2.7) It looks like we might indeed need to update all of our Makefiles where we use |
As far as So while it does install latest version of pip (10.0.0) it doesn't seem to break packs. In theory it shouldn't, because (in ideal world) packs should never import from pip or do anything like that. Having said that, I still think it's probably safer and better (and results in more reproducible virtualenv creations) to pass |
Prevent virtualenv from installing latest available pip version
Probably confused with `apt-get update` which fetches packages meta. Everything should be pre-packaged in Docker image.
Nice work - thanks! I will merge two st2 PRs into master, test them on staging unstable on all the distros (really just "st2 pack install" needs to be tested) and start working on 2.7.1 when everything is in order :) |
pip recently released new
v10.0
which broke thedh-virtualenv
packages build.So here is the rabbit hole.
While we use & pin
virtualenv 15.1.0
which advertizes to installpip 9.0.1
(https://virtualenv.pypa.io/en/stable/changes/#id1) it doesn't happen in reality.Obviously, at it happens in software world, it's not a bug but a feature, -
virtualenv
since14.0.1
installs latest available (!) pip version by default when user creates a new virtualenv (see pypa/virtualenv#1044 and pypa/virtualenv#1157).To avoid this behavior in virtualenv and stick with expected associated pip version,
--no-download
flag was added (see https://virtualenv.pypa.io/en/stable/changes/#id12):Well, it means that once we updated to newer virtualenv version (14.0.1+) which installs latest pip by default, we opened a can of worms.
TODO
--no-download
flag to virtualenv in st2-packagesdh-virtualenv
which doesn't have--extra-virtualenv-arg
dh-virtualenv
fork, re-implement custom changes StackStorm/dh-virtualenv@bf43b0a (thanks @Kami Add sendmail to the utuils used by the st2 linux pack st2-dockerfiles#61)trusty
build started to fail due to updateddh-virtualenv
fork changes, fix: StackStorm/dh-virtualenv@bab5d2est2
repo needs--no-download
as well forst2 pack install
(thanks @Kami Pass --no-download flag to virtualenv binary when we create pack virtualenv st2#4085)