run balrog unit tests in a --no-site-packages virtualenv, to avoid hidden dependencies

RESOLVED FIXED

Status

Release Engineering
General
RESOLVED FIXED
6 years ago
2 months ago

People

(Reporter: bhearsum, Assigned: bhearsum)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [balrog])

(Assignee)

Description

6 years ago
Hit this a couple of times in bug 733273 -- system installed Python libraries were present, and it wasn't until I hit production that I found that they were required, but not included in the vendor library.
FYI, from the change log http://pypi.python.org/pypi/virtualenv/1.8.4
"Made --no-site-packages behavior the default behavior. The --no-site-packages flag is still permitted, but displays a warning when used. Thanks Chris McDonough."

In other words, your virtualenv must be very out of date :)
(Assignee)

Comment 2

6 years ago
It wouldn't surprise me at all if the version on jenkins.m.o is really old - everything else there seems to be!
Suppose it is, then the solution is to pin versions. 

If you do `pip install foo==1.0.2` and foo 1.0.1 is already installed in the system python then 1.0.2 *will* be installed in the virtual env.
(Assignee)

Updated

6 years ago
Whiteboard: [balrog]
(Assignee)

Comment 4

5 years ago
Turns out we're already doing this: https://github.com/mozilla/balrog/blob/master/Makefile#L33

(In reply to Peter Bengtsson [:peterbe] from comment #3)
> Suppose it is, then the solution is to pin versions. 
> 
> If you do `pip install foo==1.0.2` and foo 1.0.1 is already installed in the
> system python then 1.0.2 *will* be installed in the virtual env.

And we have pinned versions, hooray! https://github.com/mozilla/balrog/blob/master/requirements/prod.txt
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
Component: General Automation → General
Product: Release Engineering → Release Engineering
You need to log in before you can comment on or make changes to this bug.