Make sure mach in the interactive worker uses the test package's virtualenv

RESOLVED FIXED in Firefox 50

Status

Testing
General
RESOLVED FIXED
11 months ago
11 months ago

People

(Reporter: ahal, Assigned: ahal)

Tracking

(Blocks: 1 bug)

unspecified
mozilla50
Points:
---

Firefox Tracking Flags

(firefox50 fixed)

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

11 months ago
I realized that the mach environment in the interactive worker wasn't using the proper virtualenv (in /home/worker/workspace/build/venv). This manifested in an ImportError: No module named 'requests'.

Even though most of the packages (except requests) are already added to sys.path by the mach bootstrap, it's definitely best if we simply re-use the virtualenv altogether.

I found the easiest way to get mach to use the virtualenv is to add /home/worker/workspace/build/venv/bin to the $PATH.
(Assignee)

Comment 1

11 months ago
Created attachment 8775713 [details]
Bug 1289879 - Activate the mozharness virtualenv when running tests on interactive workers,

There are some packages like 'requests' that are bundled in the mozharness venv, but not in the test
package. It would be easy to manually add these to sys.path in the mach bootstrap script, but it's
much nicer to simply activate this virtualenv in the first place.

Review commit: https://reviewboard.mozilla.org/r/67850/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/67850/
Attachment #8775713 - Flags: review?(armenzg)

Comment 2

11 months ago
Comment on attachment 8775713 [details]
Bug 1289879 - Activate the mozharness virtualenv when running tests on interactive workers,

https://reviewboard.mozilla.org/r/67850/#review64872
Attachment #8775713 - Flags: review?(armenzg) → review+

Comment 3

11 months ago
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f3d6887279f8
Activate the mozharness virtualenv when running tests on interactive workers, r=armenzg

Comment 4

11 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/f3d6887279f8
Status: ASSIGNED → RESOLVED
Last Resolved: 11 months ago
status-firefox50: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.