StorminStanley / st2workroom

Vagrant environment used to play with StackStorm, develop StackStorm for your environment, or develop on StackStorm itself!
Apache License 2.0
23 stars 19 forks source link

Specify min pip version #323

Closed Kami closed 8 years ago

Kami commented 8 years ago

This fixes regression introduced by #318.

We only specified a max version and not a min one which means any pip version prior 8.0.0 would satisfy that requirement.

This means that on the systems which ship old pip versions things would break since pip < 6.1 doesn't include all the functionality we need.

Caught by @dzimine.

Kami commented 8 years ago

Merged into test-v1.3.0 branch for testing.

Kami commented 8 years ago

Looks like there is something more going on.

root@server-01:~# pip -V
pip 7.1.2 from /usr/local/lib/python2.7/dist-packages (python 2.7)
root@server-01:~# /opt/stackstorm/virtualenvs/st2/bin/pip -V
pip 1.5.4 from /opt/stackstorm/virtualenvs/st2/local/lib/python2.7/site-packages (python 2.7)

It looks like for some reason pip version in virtualenv is really old.

Kami commented 8 years ago
root@server-02:~# pip -V
pip 7.1.2 from /usr/local/lib/python2.7/dist-packages (python 2.7)
root@server-02:~# virtualenv -p /usr/bin/python v3
Already using interpreter /usr/bin/python
New python executable in v3/bin/python
Installing setuptools, pip...done.     
root@server-02:~# v3/bin/pip -V
pip 1.5.4 from /root/v3/local/lib/python2.7/site-packages (python 2.7)
root@server-02:~# virtualenv --version
1.11.4

The root cause seems to be using very old virtualenv which uses old pip version by default. I'm still baffled how this worked in the past.

Kami commented 8 years ago

I want to test those changes (https://github.com/StackStorm/st2/pull/2420) from st2 as well, notably the requirements.txt change, so I'm using a little "trick".

curl -L -o install.sh https://install.stackstorm.com
DEBUG=1 bash install.sh -a answers.yaml

answers.yaml contains:

st2::version: 1.3dev
st2::revision: 94

The reason for using dev version is to force puppet-st2 to use requirements.txt from master and not from a tag - https://github.com/StackStorm/puppet-st2/blob/master/manifests/profile/server.pp#L81

Kami commented 8 years ago

I'm going to merge this since it doesn't break anything, but it's not a full fix for the virtualenv issue.

Full fix for the virtualenv issue is to be discussed on.