Bug 1304176 - Move pip find-links defaults out of mozharness configs; r?ted draft
authorGregory Szorc <gps@mozilla.com>
Wed, 21 Sep 2016 11:13:07 -0700
changeset 416242 42e5cf8b24a896cb259fab065f69efa9b7b32421
parent 416228 da21fcc9d6f1dbc8e1590a10f74118abebbad160
child 416243 c14350f627929fa7b2be3e21e981f305f811f9b9
push id30070
push usergszorc@mozilla.com
push dateWed, 21 Sep 2016 18:14:36 +0000
reviewersted
bugs1304176
milestone52.0a1
Bug 1304176 - Move pip find-links defaults out of mozharness configs; r?ted Nearly every job installing things from pip defines a custom find_links config option listing the same 2 URLs to Mozilla's pip mirrors. There are a few problems with this. First, it is excessive typing and config noise. If we always have a config, it should be the default. Second, recent changes to use modern pip and always define --trusted-host when needed cause a regression under certain circumstances. When the private pypi host is not available, pip wastes several seconds attempting to connect and reconnect to it before moving on to the public host. This caused pip operations to slow down. As part of moving the links URLs to the Python, we put the public server first. MozReview-Commit-ID: DMqDWewOxph
testing/mozharness/configs/b2g/emulator_automation_config.py
testing/mozharness/configs/b2g/taskcluster_emulator_automation.py
testing/mozharness/configs/b2g/taskcluster_gaia_integration.py
testing/mozharness/configs/b2g/taskcluster_gaia_unit_production.py
testing/mozharness/configs/b2g/taskcluster_mulet_automation.py
testing/mozharness/configs/developer_config.py
testing/mozharness/configs/firefox_ui_tests/qa_jenkins.py
testing/mozharness/configs/firefox_ui_tests/releng_release.py
testing/mozharness/configs/firefox_ui_tests/taskcluster.py
testing/mozharness/configs/luciddream/linux_config.py
testing/mozharness/configs/marionette/automation_emulator_config.py
testing/mozharness/configs/marionette/gaia_ui_test_prod_config.py
testing/mozharness/configs/marionette/prod_config.py
testing/mozharness/configs/marionette/windows_config.py
testing/mozharness/configs/mediatests/buildbot_posix_config.py
testing/mozharness/configs/mediatests/buildbot_windows_config.py
testing/mozharness/configs/mediatests/jenkins_config.py
testing/mozharness/configs/releng_infra_configs/builders.py
testing/mozharness/configs/releng_infra_configs/testers.py
testing/mozharness/configs/talos/linux_config.py
testing/mozharness/configs/talos/mac_config.py
testing/mozharness/configs/talos/windows_config.py
testing/mozharness/configs/unittests/linux_unittest.py
testing/mozharness/configs/unittests/mac_unittest.py
testing/mozharness/configs/unittests/win_unittest.py
testing/mozharness/configs/web_platform_tests/prod_config.py
testing/mozharness/configs/web_platform_tests/prod_config_windows.py
testing/mozharness/configs/web_platform_tests/test_config.py
testing/mozharness/configs/web_platform_tests/test_config_windows.py
testing/mozharness/mozharness/base/python.py
testing/mozharness/scripts/marionette_harness_tests.py
testing/mozharness/scripts/push_apk.py
testing/mozharness/scripts/update_apk_description.py
--- a/testing/mozharness/configs/b2g/emulator_automation_config.py
+++ b/testing/mozharness/configs/b2g/emulator_automation_config.py
@@ -11,20 +11,16 @@ config = {
     "tooltool_cache": "/builds/tooltool_cache",
 
     "exes": {
         'python': '/tools/buildbot/bin/python',
         'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
         'tooltool.py': "/tools/tooltool.py",
     },
 
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
 
     "buildbot_json_path": "buildprops.json",
 
     "default_actions": [
         'clobber',
         'read-buildbot-config',
         'download-and-extract',
--- a/testing/mozharness/configs/b2g/taskcluster_emulator_automation.py
+++ b/testing/mozharness/configs/b2g/taskcluster_emulator_automation.py
@@ -1,19 +1,15 @@
 #!/usr/bin/env python
 import os.path
 config = {
     # mozharness options
     "application": "b2g",
     "tooltool_cache": "/builds/tooltool_cache",
 
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
 
     "default_actions": [
         'clobber',
         'download-and-extract',
         'create-virtualenv',
         'install',
         'run-tests',
--- a/testing/mozharness/configs/b2g/taskcluster_gaia_integration.py
+++ b/testing/mozharness/configs/b2g/taskcluster_gaia_integration.py
@@ -2,20 +2,16 @@
 import platform
 
 HG_SHARE_BASE_DIR = "/builds/hg-shared"
 
 config = {
     # mozharness script options
     "vcs_share_base": HG_SHARE_BASE_DIR,
 
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
 
     "download_symbols": "ondemand",
     # We bake this directly into the tester image now.
     "download_minidump_stackwalk": False,
 
     "default_actions": [
         'clobber',
--- a/testing/mozharness/configs/b2g/taskcluster_gaia_unit_production.py
+++ b/testing/mozharness/configs/b2g/taskcluster_gaia_unit_production.py
@@ -3,20 +3,16 @@ import platform
 import os
 
 HG_SHARE_BASE_DIR = "/builds/hg-shared"
 
 config = {
     # mozharness script options
     "vcs_share_base": HG_SHARE_BASE_DIR,
 
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
 
     "default_actions": [
         'clobber',
         'download-and-extract',
         'create-virtualenv',
         'install',
         'run-tests',
--- a/testing/mozharness/configs/b2g/taskcluster_mulet_automation.py
+++ b/testing/mozharness/configs/b2g/taskcluster_mulet_automation.py
@@ -1,16 +1,12 @@
 # This is a template config file for mulet unittest testing
 import os
 
 config = {
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
 
     "download_symbols": "ondemand",
     # We bake this directly into the tester image now.
     "download_minidump_stackwalk": False,
     "default_blob_upload_servers": [
         "https://blobupload.elasticbeanstalk.com",
     ],
--- a/testing/mozharness/configs/developer_config.py
+++ b/testing/mozharness/configs/developer_config.py
@@ -22,17 +22,16 @@ config = {
     ],
 
     # General local variable overwrite
     "exes": {
         "gittool.py": os.path.join(LOCAL_WORKDIR, "gittool.py"),
     },
 
     # Pip
-    "find_links": ["http://pypi.pub.build.mozilla.org/pub"],
     "pip_index": False,
 
     # Talos related
     "python_webserver": True,
     "virtualenv_path": '%s/build/venv' % os.getcwd(),
     "preflight_run_cmd_suites": [],
     "postflight_run_cmd_suites": [],
 
--- a/testing/mozharness/configs/firefox_ui_tests/qa_jenkins.py
+++ b/testing/mozharness/configs/firefox_ui_tests/qa_jenkins.py
@@ -1,16 +1,15 @@
 # Default configuration as used by Mozmill CI (Jenkins)
 
 
 config = {
     # Tests run in mozmill-ci do not use RelEng infra
     'developer_mode': True,
 
     # PIP
-    'find_links': ['http://pypi.pub.build.mozilla.org/pub'],
     'pip_index': False,
 
     # mozcrash support
     'download_minidump_stackwalk': True,
     'download_symbols': 'ondemand',
     'download_tooltool': True,
 }
--- a/testing/mozharness/configs/firefox_ui_tests/releng_release.py
+++ b/testing/mozharness/configs/firefox_ui_tests/releng_release.py
@@ -18,16 +18,15 @@ config = {
         'gittool.py': [
             # Bug 1227079 - Python executable eeded to get it executed on Windows
             sys.executable,
             os.path.join(external_tools_path, 'gittool.py')
         ],
     },
 
     # PIP
-    'find_links': ['http://pypi.pub.build.mozilla.org/pub'],
     'pip_index': False,
 
     # mozcrash support
     'download_minidump_stackwalk': True,
     'download_symbols': 'ondemand',
     'download_tooltool': True,
 }
--- a/testing/mozharness/configs/firefox_ui_tests/taskcluster.py
+++ b/testing/mozharness/configs/firefox_ui_tests/taskcluster.py
@@ -1,11 +1,7 @@
 # Config file for firefox ui tests run via TaskCluster.
 
 config = {
-    "find_links": [
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
-
     "pip_index": False,
 
     "tooltool_cache": "/builds/tooltool_cache",
 }
--- a/testing/mozharness/configs/luciddream/linux_config.py
+++ b/testing/mozharness/configs/luciddream/linux_config.py
@@ -18,20 +18,16 @@ config = {
     "vcs_share_base": HG_SHARE_BASE_DIR,
     "exes": {
         'python': '/tools/buildbot/bin/python',
         'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
         'tooltool.py': "/tools/tooltool.py",
         'gittool.py': '%(abs_tools_dir)s/buildfarm/utils/gittool.py',
     },
 
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
 
     "suite_definitions": {
         "luciddream-emulator": {
             "options": [
                 "--startup-timeout=300",
                 "--log-raw=%(raw_log_file)s",
                 "--log-errorsummary=%(error_summary_file)s",
--- a/testing/mozharness/configs/marionette/automation_emulator_config.py
+++ b/testing/mozharness/configs/marionette/automation_emulator_config.py
@@ -14,20 +14,16 @@ config = {
 
     "vcs_share_base": HG_SHARE_BASE_DIR,
     "exes": {
         'python': '/tools/buildbot/bin/python',
         'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
         'tooltool.py': "/tools/tooltool.py",
     },
 
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
 
     "buildbot_json_path": "buildprops.json",
 
     "default_actions": [
         'clobber',
         'read-buildbot-config',
         'download-and-extract',
--- a/testing/mozharness/configs/marionette/gaia_ui_test_prod_config.py
+++ b/testing/mozharness/configs/marionette/gaia_ui_test_prod_config.py
@@ -19,20 +19,16 @@ config = {
 
     "vcs_share_base": HG_SHARE_BASE_DIR,
     "exes": {
         'python': '/tools/buildbot/bin/python',
         'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
         'tooltool.py': "/tools/tooltool.py",
     },
 
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
 
     "buildbot_json_path": "buildprops.json",
 
     "default_actions": [
         'clobber',
         'read-buildbot-config',
         'pull',
--- a/testing/mozharness/configs/marionette/prod_config.py
+++ b/testing/mozharness/configs/marionette/prod_config.py
@@ -10,20 +10,16 @@ config = {
 
     "vcs_share_base": HG_SHARE_BASE_DIR,
     "exes": {
         'python': '/tools/buildbot/bin/python',
         'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
         'tooltool.py': "/tools/tooltool.py",
     },
 
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
 
     "buildbot_json_path": "buildprops.json",
 
     "default_actions": [
         'clobber',
         'read-buildbot-config',
         'download-and-extract',
--- a/testing/mozharness/configs/marionette/windows_config.py
+++ b/testing/mozharness/configs/marionette/windows_config.py
@@ -13,20 +13,16 @@ config = {
         'python': 'c:/mozilla-build/python27/python',
         'virtualenv': ['c:/mozilla-build/python27/python', 'c:/mozilla-build/buildbotve/virtualenv.py'],
         'hg': 'c:/mozilla-build/hg/hg',
         'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
                        '%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
         'tooltool.py': [sys.executable, 'C:/mozilla-build/tooltool.py'],
     },
 
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
 
     "buildbot_json_path": "buildprops.json",
 
     "default_actions": [
         'clobber',
         'read-buildbot-config',
         'download-and-extract',
--- a/testing/mozharness/configs/mediatests/buildbot_posix_config.py
+++ b/testing/mozharness/configs/mediatests/buildbot_posix_config.py
@@ -9,20 +9,16 @@ external_tools_path = os.path.join(
 config = {
     "virtualenv_path": 'venv',
     "exes": {
         'python': '/tools/buildbot/bin/python',
         'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
         'tooltool.py': "/tools/tooltool.py",
     },
 
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
 
     "buildbot_json_path": "buildprops.json",
 
     "default_actions": [
         'clobber',
         'read-buildbot-config',
         'download-and-extract',
--- a/testing/mozharness/configs/mediatests/buildbot_windows_config.py
+++ b/testing/mozharness/configs/mediatests/buildbot_windows_config.py
@@ -14,20 +14,16 @@ config = {
         'python': 'c:/mozilla-build/python27/python',
         'virtualenv': ['c:/mozilla-build/python27/python', 'c:/mozilla-build/buildbotve/virtualenv.py'],
         'hg': 'c:/mozilla-build/hg/hg',
         'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
                        '%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
         'tooltool.py': [sys.executable, 'C:/mozilla-build/tooltool.py'],
     },
 
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
 
     "buildbot_json_path": "buildprops.json",
 
     "default_actions": [
         'clobber',
         'read-buildbot-config',
         'download-and-extract',
--- a/testing/mozharness/configs/mediatests/jenkins_config.py
+++ b/testing/mozharness/configs/mediatests/jenkins_config.py
@@ -9,17 +9,16 @@ import mozharness
 
 external_tools_path = os.path.join(
     os.path.abspath(os.path.dirname(os.path.dirname(mozharness.__file__))),
     'external_tools',
 )
 
 config = {
     # PIP
-    'find_links': ['http://pypi.pub.build.mozilla.org/pub'],
     'pip_index': False,
 
     # mozcrash support
     'download_minidump_stackwalk': True,
     'download_symbols': 'ondemand',
     'download_tooltool': True,
 
     # Default test suite
--- a/testing/mozharness/configs/releng_infra_configs/builders.py
+++ b/testing/mozharness/configs/releng_infra_configs/builders.py
@@ -32,16 +32,12 @@ PLATFORM_CONFIG = {
             'virtualenv': [PYTHON_WIN32, 'c:/mozilla-build/buildbotve/virtualenv.py'],
         }
     }
 }
 
 config = PLATFORM_CONFIG[platform_name()]
 # Generic values
 config.update({
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     'pip_index': False,
     'virtualenv_path': 'venv',
 })
 
--- a/testing/mozharness/configs/releng_infra_configs/testers.py
+++ b/testing/mozharness/configs/releng_infra_configs/testers.py
@@ -53,15 +53,11 @@ PLATFORM_CONFIG = {
             'virtualenv': [PYTHON_WIN32, 'c:/mozilla-build/buildbotve/virtualenv.py'],
         }
     }
 }
 
 config = PLATFORM_CONFIG[platform_name()]
 # Generic values
 config.update({
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     'pip_index': False,
     'virtualenv_path': 'venv',
 })
--- a/testing/mozharness/configs/talos/linux_config.py
+++ b/testing/mozharness/configs/talos/linux_config.py
@@ -10,20 +10,16 @@ else:
     TOOLTOOL_MANIFEST_PATH = "config/tooltool-manifests/linux32/releng.manifest"
     MINIDUMP_STACKWALK_PATH = "linux32-minidump_stackwalk"
 
 config = {
     "log_name": "talos",
     "buildbot_json_path": "buildprops.json",
     "installer_path": "installer.exe",
     "virtualenv_path": VENV_PATH,
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
     "exes": {
         'python': PYTHON,
         'virtualenv': [PYTHON, '/tools/misc-python/virtualenv.py'],
         'tooltool.py': "/tools/tooltool.py",
     },
     "title": os.uname()[1].lower().split('.')[0],
     "default_actions": [
--- a/testing/mozharness/configs/talos/mac_config.py
+++ b/testing/mozharness/configs/talos/mac_config.py
@@ -13,20 +13,16 @@ import os
 PYTHON = '/tools/buildbot/bin/python'
 VENV_PATH = '%s/build/venv' % os.getcwd()
 
 config = {
     "log_name": "talos",
     "buildbot_json_path": "buildprops.json",
     "installer_path": "installer.exe",
     "virtualenv_path": VENV_PATH,
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
     "exes": {
         'python': PYTHON,
         'virtualenv': [PYTHON, '/tools/misc-python/virtualenv.py'],
         'tooltool.py': "/tools/tooltool.py",
     },
     "title": os.uname()[1].lower().split('.')[0],
     "default_actions": [
--- a/testing/mozharness/configs/talos/windows_config.py
+++ b/testing/mozharness/configs/talos/windows_config.py
@@ -7,20 +7,16 @@ VENV_PATH = os.path.join(os.getcwd(), 'b
 
 config = {
     "log_name": "talos",
     "buildbot_json_path": "buildprops.json",
     "installer_path": "installer.exe",
     "virtualenv_path": VENV_PATH,
     "virtualenv_python_dll": PYTHON_DLL,
     "pip_index": False,
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "virtualenv_modules": ['pywin32', 'talos', 'mozinstall'],
     "exes": {
         'python': PYTHON,
         'virtualenv': [PYTHON, 'c:/mozilla-build/buildbotve/virtualenv.py'],
         'easy_install': ['%s/scripts/python' % VENV_PATH,
                          '%s/scripts/easy_install-2.7-script.py' % VENV_PATH],
         'mozinstall': ['%s/scripts/python' % VENV_PATH,
                        '%s/scripts/mozinstall-script.py' % VENV_PATH],
--- a/testing/mozharness/configs/unittests/linux_unittest.py
+++ b/testing/mozharness/configs/unittests/linux_unittest.py
@@ -31,20 +31,16 @@ else:
 #####
 config = {
     "buildbot_json_path": "buildprops.json",
     "exes": {
         "python": "/tools/buildbot/bin/python",
         "virtualenv": ["/tools/buildbot/bin/python", "/tools/misc-python/virtualenv.py"],
         "tooltool.py": "/tools/tooltool.py",
     },
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
     ###
     "installer_path": INSTALLER_PATH,
     "binary_path": BINARY_PATH,
     "xpcshell_name": XPCSHELL_NAME,
     "exe_suffix": EXE_SUFFIX,
     "run_file_names": {
         "mochitest": "runtests.py",
--- a/testing/mozharness/configs/unittests/mac_unittest.py
+++ b/testing/mozharness/configs/unittests/mac_unittest.py
@@ -9,20 +9,16 @@ ADJUST_MOUSE_AND_SCREEN = False
 #####
 config = {
     "buildbot_json_path": "buildprops.json",
     "exes": {
         'python': '/tools/buildbot/bin/python',
         'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
         'tooltool.py': "/tools/tooltool.py",
     },
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
     ###
     "installer_path": INSTALLER_PATH,
     "xpcshell_name": XPCSHELL_NAME,
     "exe_suffix": EXE_SUFFIX,
     "run_file_names": {
         "mochitest": "runtests.py",
         "reftest": "runreftest.py",
--- a/testing/mozharness/configs/unittests/win_unittest.py
+++ b/testing/mozharness/configs/unittests/win_unittest.py
@@ -23,20 +23,16 @@ config = {
     ###
     "installer_path": INSTALLER_PATH,
     "binary_path": BINARY_PATH,
     "xpcshell_name": XPCSHELL_NAME,
     "virtualenv_path": 'venv',
     "virtualenv_python_dll": os.path.join(os.path.dirname(sys.executable), "python27.dll"),
     "virtualenv_modules": ['pywin32'],
 
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
     "exe_suffix": EXE_SUFFIX,
     "run_file_names": {
         "mochitest": "runtests.py",
         "reftest": "runreftest.py",
         "xpcshell": "runxpcshelltests.py",
         "cppunittest": "runcppunittests.py",
         "gtest": "rungtests.py",
--- a/testing/mozharness/configs/web_platform_tests/prod_config.py
+++ b/testing/mozharness/configs/web_platform_tests/prod_config.py
@@ -17,21 +17,16 @@ config = {
     ],
 
     "exes": {
         'python': '/tools/buildbot/bin/python',
         'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
         'tooltool.py': "/tools/tooltool.py",
     },
 
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
-
     "pip_index": False,
 
     "buildbot_json_path": "buildprops.json",
 
     "default_blob_upload_servers": [
          "https://blobupload.elasticbeanstalk.com",
     ],
 
--- a/testing/mozharness/configs/web_platform_tests/prod_config_windows.py
+++ b/testing/mozharness/configs/web_platform_tests/prod_config_windows.py
@@ -24,21 +24,16 @@ config = {
         'python': sys.executable,
         'virtualenv': [sys.executable, 'c:/mozilla-build/buildbotve/virtualenv.py'],
         'hg': 'c:/mozilla-build/hg/hg',
         'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
                        '%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
         'tooltool.py': [sys.executable, 'C:/mozilla-build/tooltool.py'],
     },
 
-    "find_links": [
-        "http://pypi.pvt.build.mozilla.org/pub",
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
-
     "pip_index": False,
 
     "buildbot_json_path": "buildprops.json",
 
     "default_blob_upload_servers": [
          "https://blobupload.elasticbeanstalk.com",
     ],
 
--- a/testing/mozharness/configs/web_platform_tests/test_config.py
+++ b/testing/mozharness/configs/web_platform_tests/test_config.py
@@ -19,14 +19,10 @@ config = {
         'clobber',
         'download-and-extract',
         'create-virtualenv',
         'pull',
         'install',
         'run-tests',
     ],
 
-    "find_links": [
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
-
     "pip_index": False,
 }
--- a/testing/mozharness/configs/web_platform_tests/test_config_windows.py
+++ b/testing/mozharness/configs/web_platform_tests/test_config_windows.py
@@ -30,14 +30,10 @@ config = {
         'clobber',
         'download-and-extract',
         'create-virtualenv',
         'pull',
         'install',
         'run-tests',
     ],
 
-    "find_links": [
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
-
     "pip_index": False,
 }
--- a/testing/mozharness/mozharness/base/python.py
+++ b/testing/mozharness/mozharness/base/python.py
@@ -215,33 +215,42 @@ class VirtualenvMixin(object):
         """
         c = self.config
         dirs = self.query_abs_dirs()
         env = self.query_env()
         venv_path = self.query_virtualenv_path()
         self.info("Installing %s into virtualenv %s" % (module, venv_path))
         if not module_url:
             module_url = module
+
+        find_links = c.get('find_links', [
+            # The public host is first because not all hosts can connect
+            # to the private one. And pip will retry connections to the
+            # private host, delaying execution.
+            'http://pypi.pub.build.mozilla.org/pub',
+            'http://pypi.pvt.build.mozilla.org/pub'
+        ])
+
         if install_method in (None, 'pip'):
             if not module_url and not requirements:
                 self.fatal("Must specify module and/or requirements")
             pip = self.query_python_path("pip")
             if c.get("verbose_pip"):
                 command = [pip, "-v", "install"]
             else:
                 command = [pip, "install"]
             if no_deps:
                 command += ["--no-deps"]
             # To avoid timeouts with our pypi server, increase default timeout:
             # https://bugzilla.mozilla.org/show_bug.cgi?id=1007230#c802
             command += ['--timeout', str(c.get('pip_timeout', 120))]
             for requirement in requirements:
                 command += ["-r", requirement]
-            if c.get('find_links') and not c["pip_index"]:
-                command += ['--no-index']
+            if not c['pip_index']:
+                command.append('--no-index')
             for opt in global_options:
                 command += ["--global-option", opt]
         elif install_method == 'easy_install':
             if not module:
                 self.fatal("module parameter required with install_method='easy_install'")
             if requirements:
                 # Install pip requirements files separately, since they're
                 # not understood by easy_install.
@@ -260,17 +269,17 @@ class VirtualenvMixin(object):
         else:
             self.fatal("install_module() doesn't understand an install_method of %s!" % install_method)
 
         # Add --find-links pages to look at. Add --trusted-host automatically if
         # the host isn't secure. This allows modern versions of pip to connect
         # without requiring an override.
         proxxy = Proxxy(self.config, self.log_obj)
         trusted_hosts = set()
-        for link in proxxy.get_proxies_and_urls(c.get('find_links', [])):
+        for link in proxxy.get_proxies_and_urls(find_links):
             command.extend(["--find-links", link])
             parsed = urlparse.urlparse(link)
             if parsed.scheme != 'https':
                 trusted_hosts.add(parsed.hostname)
 
         if self.pip_version >= distutils.version.LooseVersion('6.0'):
             for host in sorted(trusted_hosts):
                 command.extend(['--trusted-host', host])
--- a/testing/mozharness/scripts/marionette_harness_tests.py
+++ b/testing/mozharness/scripts/marionette_harness_tests.py
@@ -30,19 +30,16 @@ marionette_harness_tests_config_options 
         'dest': 'rel_src_dir',
         'default': None,
         'help': 'Path to hg.mo source checkout relative to work dir.',
     }],
 
 ] + copy.deepcopy(virtualenv_config_options)
 
 marionette_harness_tests_config = {
-    "find_links": [
-        "http://pypi.pub.build.mozilla.org/pub",
-    ],
     "pip_index": False,
     # relative to workspace
     "rel_src_dir": os.path.join("build", "src"),
 }
 
 class MarionetteHarnessTests(VirtualenvMixin, BuildbotMixin, BaseScript):
 
     def __init__(self, config_options=None,
--- a/testing/mozharness/scripts/push_apk.py
+++ b/testing/mozharness/scripts/push_apk.py
@@ -79,20 +79,16 @@ class PushAPK(BaseScript, GooglePlayMixi
                  default_actions=default_actions):
 
         # Default configuration
         default_config = {
             'debug_build': False,
             'pip_index': True,
             # this will pip install it automajically when we call the create-virtualenv action
             'virtualenv_modules': ['google-api-python-client'],
-            "find_links": [   # so mozharness knows where to look for the package
-                "http://pypi.pvt.build.mozilla.org/pub",
-                "http://pypi.pub.build.mozilla.org/pub",
-            ],
             # the path inside the work_dir ('build') of where we will install the env.
             # pretty sure it's the default and not needed.
             'virtualenv_path': 'venv',
         }
         default_config.update(config)
 
         BaseScript.__init__(
             self,
--- a/testing/mozharness/scripts/update_apk_description.py
+++ b/testing/mozharness/scripts/update_apk_description.py
@@ -70,20 +70,16 @@ class UpdateDescriptionAPK(BaseScript, G
 
         # Default configuration
         default_config = {
             'debug_build': False,
             'pip_index': True,
             # this will pip install it automajically when we call the
             # create-virtualenv action
             'virtualenv_modules': ['google-api-python-client'],
-            "find_links": [
-                "http://pypi.pvt.build.mozilla.org/pub",
-                "http://pypi.pub.build.mozilla.org/pub",
-            ],
             'virtualenv_path': 'venv',
         }
         default_config.update(config)
 
         BaseScript.__init__(
             self,
             config_options=self.config_options,
             require_config_file=require_config_file,