Closed Bug 1304176 Opened 8 years ago Closed 8 years ago

Use virtualenv/pip from source checkout, if available

Categories

(Release Engineering :: Applications: MozharnessCore, defect)

defect
Not set
normal

Tracking

(firefox52 fixed)

RESOLVED FIXED
Tracking Status
firefox52 --- fixed

People

(Reporter: gps, Assigned: gps)

References

(Blocks 2 open bugs)

Details

Attachments

(6 files, 3 obsolete files)

I've got some scope bloat I wrote as part of bug 1286900 related to virtualenv/pip management foo. It makes virtualenv/pip foo faster and more robust.
Attachment #8793112 - Attachment is obsolete: true
Attachment #8793112 - Flags: review?(ted)
Attachment #8793427 - Attachment is obsolete: true
Attachment #8793427 - Flags: review?(ted)
Attachment #8793438 - Attachment is obsolete: true
Attachment #8793438 - Flags: review?(ted)
Comment on attachment 8793049 [details] Bug 1304176 - Set BaseScript.topsrcdir if we have a source checkout; https://reviewboard.mozilla.org/r/79858/#review79434 ::: testing/mozharness/mozharness/base/script.py:1789 (Diff revision 3) > self.script_obj = self > > + # Indicate we're a source checkout if VCS directory is present at the > + # appropriate place. This assumes we're at > + # testing/mozharness/mozharness/base/script.py. > + here = os.path.normpath(os.path.dirname(__file__)) It'd be good to `assert(here.endswith('testing/mozharness/mozharness/base/script.py'))` to make sure this doesn't get broken in a file move.
Attachment #8793049 - Flags: review?(ted) → review+
Comment on attachment 8793050 [details] Bug 1304176 - Use vendored tooltool.py if available; https://reviewboard.mozilla.org/r/79860/#review79440 ::: testing/mozharness/mozharness/mozilla/tooltool.py:49 (Diff revision 3) > if os.path.exists(fn): > return fn > > def tooltool_fetch(self, manifest, > output_dir=None, privileged=False, cache=None): > """docstring for tooltool_fetch""" LOL
Attachment #8793050 - Flags: review?(ted) → review+
Comment on attachment 8793051 [details] Bug 1304176 - Use vendored virtualenv if available; https://reviewboard.mozilla.org/r/79862/#review79444 ::: testing/mozharness/mozharness/base/python.py:376 (Diff revision 4) > + ] > + virtualenv_options = c.get('virtualenv_options', []) > + # Don't create symlinks. If we don't do this, permissions issues may > + # hinder virtualenv creation or operation. Ideally we should do this > + # below when using the system virtualenv. However, this is a newer > + # feature and isn't guaranteed to be supported. Is this because we have bad permissions on some of our vendored packages or what?
Attachment #8793051 - Flags: review?(ted) → review+
Comment on attachment 8793109 [details] Bug 1304176 - Remove PIP_TRUSTED_HOST and trust-host pip.conf option; https://reviewboard.mozilla.org/r/79882/#review79446
Attachment #8793109 - Flags: review?(ted) → review+
Comment on attachment 8793110 [details] Bug 1304176 - Remove --venv-path as an alias to --virtualenv-path; https://reviewboard.mozilla.org/r/79884/#review79450
Attachment #8793110 - Flags: review?(ted) → review+
Comment on attachment 8793111 [details] Bug 1304176 - Document and refactor query_virtualenv_path; https://reviewboard.mozilla.org/r/79886/#review79452
Attachment #8793111 - Flags: review?(ted) → review+
Comment on attachment 8793051 [details] Bug 1304176 - Use vendored virtualenv if available; https://reviewboard.mozilla.org/r/79862/#review79444 > Is this because we have bad permissions on some of our vendored packages or what? I have a suspicion it is a bug in virtualenv. I think it is creating a symlink in the virtualenv to the system-managed site-packages directory where distutils is installed. It then attempts to overwrite that file, yielding a permissions failure.
Pushed by gszorc@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2e07640f74cf Set BaseScript.topsrcdir if we have a source checkout; r=ted https://hg.mozilla.org/integration/autoland/rev/b64330d3db8d Use vendored tooltool.py if available; r=ted https://hg.mozilla.org/integration/autoland/rev/3fd83c9c0548 Use vendored virtualenv if available; r=ted https://hg.mozilla.org/integration/autoland/rev/8dc87cef62fb Remove PIP_TRUSTED_HOST and trust-host pip.conf option; r=ted https://hg.mozilla.org/integration/autoland/rev/1c0787d40b97 Remove --venv-path as an alias to --virtualenv-path; r=ted https://hg.mozilla.org/integration/autoland/rev/d5355738ce1e Document and refactor query_virtualenv_path; r=ted
Blocks: 1305804
The attempt to use --trusted-host breaks our in-progress work on TC Windows tests: https://public-artifacts.taskcluster.net/Q36z7Ot9Sg-klAeWDrQr9g/0/public/logs/live_backing.log 17:49:02 INFO - Running command: ['build/venv/Scripts/easy_install.exe', '--find-links', 'http://pypi.pub.build.mozilla.org/pub', '--trusted-host', 'pypi.pub.build.mozilla.org', 'pywin32'] in Z:\task_1475256254\build ... 17:49:04 INFO - usage: easy_install [options] requirement_or_url ... 17:49:04 INFO - or: easy_install --help 17:49:04 INFO - error: option --trusted-host not recognized 17:49:04 WARNING - Return code: 1 17:49:04 INFO - retry: Failed, sleeping 60 seconds before retrying Do you have a suggestion for dealing with that?
Flags: needinfo?(gps)
easy_install should not be used in 2016. I'll fix mozharness.
Flags: needinfo?(gps)
Blocks: 1306691
See Also: → 1280474
Blocks: 1307305
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: