Page MenuHomePhabricator

Pin tox to a specific version
Closed, ResolvedPublic

Description

With T46443 we have python tox installed using the puppet 'pip' provider:

package { 'tox':
    ensure   => present,
    provider => 'pip',
    require  => Package['python-pip'],
}

I guess that installs whatever latest version is available in pipy, so we want to pin it to a specific version. Looking at puppet code, it seems we can pass the version to the ensure parameters.

Currently all slaves have 1.9.2.

Details

Related Changes in Gerrit:

Event Timeline

hashar claimed this task.
hashar raised the priority of this task from to Medium.
hashar updated the task description. (Show Details)

Change 226694 had a related patch set uploaded (by Hashar):
contint: pin tox to version 1.9.2

https://gerrit.wikimedia.org/r/226694

I used integration-slave-trusty-1011 as a playground area. I uninstalled pip and ran puppet:

Debug: Executing '/usr/bin/pip install -q tox'
Notice: /Stage[main]/Contint::Packages::Labs/Package[tox]/ensure: created
tox --version
2.1.1 imported from /usr/local/lib/python2.7/dist-packages/tox/__init__.pyc

With Gerrit patch contint: pin tox to version 1.9.2 https://gerrit.wikimedia.org/r/#/c/226694/ which uses ensure => '1.9.2' :

Debug: Executing '/usr/bin/pip install -q tox==1.9.2'
Notice: /Stage[main]/Contint::Packages::Labs/Package[tox]/ensure: created
tox --version
1.9.2 imported from /usr/local/lib/python2.7/dist-packages/tox/__init__.pyc

Deployed https://gerrit.wikimedia.org/r/#/c/226694/ on the integration puppetmaster and that works.

Now pending for ops to review and merge the change.

Change 226694 merged by Giuseppe Lavagetto:
contint: pin tox to version 1.9.2

https://gerrit.wikimedia.org/r/226694