Last Comment Bug 1289879 - Make sure mach in the interactive worker uses the test package's virtualenv
: Make sure mach in the interactive worker uses the test package's virtualenv
Status: RESOLVED FIXED
:
Product: Testing
Classification: Components
Component: General (show other bugs)
: unspecified
: Unspecified Unspecified
-- normal (vote)
: mozilla50
Assigned To: Andrew Halberstadt [:ahal]
:
:
Mentors:
Depends on:
Blocks: 1262605
  Show dependency treegraph
 
Reported: 2016-07-27 12:19 PDT by Andrew Halberstadt [:ahal]
Modified: 2016-07-31 08:46 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed

MozReview Requests
Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:
Show discarded requests

Attachments
Bug 1289879 - Activate the mozharness virtualenv when running tests on interactive workers, (58 bytes, text/x-review-board-request)
2016-07-28 13:00 PDT, Andrew Halberstadt [:ahal]
armenzg: review+
Details | Review

Description User image Andrew Halberstadt [:ahal] 2016-07-27 12:19:27 PDT
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.
Comment 1 User image Andrew Halberstadt [:ahal] 2016-07-28 13:00:18 PDT
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/
Comment 2 User image Armen Zambrano - Back on March 27th [:armenzg] (EDT/UTC-4) 2016-07-28 13:42:10 PDT
Comment on attachment 8775713 [details]
Bug 1289879 - Activate the mozharness virtualenv when running tests on interactive workers,

https://reviewboard.mozilla.org/r/67850/#review64872
Comment 3 User image Pulsebot 2016-07-29 04:53:40 PDT
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 User image Carsten Book [:Tomcat] 2016-07-31 08:46:37 PDT
https://hg.mozilla.org/mozilla-central/rev/f3d6887279f8

Note You need to log in before you can comment on or make changes to this bug.