Bug 1590728 - uplifting (Bug 1557255) switch from relengapi-proxy to taskcluster-proxy in taskgraph. a=jorgk DONTBUILD CLOSED TREE THUNDERBIRD_60_VERBRANCH tip
authorRok Garbas <rok@garbas.si>
Thu, 24 Oct 2019 10:46:35 +0300
branchTHUNDERBIRD_60_VERBRANCH
changeset 451336 4f509288cfcabfd5ce6a6f3f6b5e11d239781719
parent 451335 5ed158a795f6468f0d83541040cdd07c96faee9b
push id514
push usermozilla@jorgk.com
push dateThu, 31 Oct 2019 08:19:41 +0000
treeherdermozilla-esr60@4f509288cfca [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk
bugs1590728, 1557255
milestone60.9.1
Bug 1590728 - uplifting (Bug 1557255) switch from relengapi-proxy to taskcluster-proxy in taskgraph. a=jorgk DONTBUILD CLOSED TREE Differential Revision: https://phabricator.services.mozilla.com/D50439
taskcluster/scripts/misc/tooltool-download.sh
taskcluster/taskgraph/actions/create_interactive.py
taskcluster/taskgraph/transforms/job/common.py
taskcluster/taskgraph/transforms/task.py
testing/mozharness/configs/android/android_common.py
testing/mozharness/configs/builds/build_pool_specifics.py
testing/mozharness/configs/repackage/linux32_signed.py
testing/mozharness/configs/repackage/linux64_signed.py
testing/mozharness/configs/repackage/osx_partner.py
testing/mozharness/configs/repackage/osx_signed.py
testing/mozharness/configs/single_locale/tc_android-api-16.py
testing/mozharness/configs/single_locale/tc_macosx64.py
--- a/taskcluster/scripts/misc/tooltool-download.sh
+++ b/taskcluster/scripts/misc/tooltool-download.sh
@@ -8,24 +8,24 @@ Linux)
     ;;
 MINGW*)
     TOOLTOOL_AUTH_FILE=c:/builds/relengapi.tok
     ;;
 esac
 
 TOOLTOOL_DL_FLAGS=
 
-if [ -e "$TOOLTOOL_AUTH_FILE" ]; then
+if [ -e "$TASKCLUSTER_PROXY_URL" ]; then
     # When the worker has the relengapi token pass it down
-    TOOLTOOL_DL_FLAGS="${TOOLTOOL_DL_FLAGS=} --authentication-file=$TOOLTOOL_AUTH_FILE"
+    TOOLTOOL_DL_FLAGS="${TOOLTOOL_DL_FLAGS=} --tooltool-url=${TASKCLUSTER_PROXY_URL}/tooltool.mozilla-releng.net/"
 fi
 
-if [ -n "$RELENGAPI_PORT" ]; then
+if [ -n "$T" ]; then
     # When the worker has the relengapi proxy setup, use it.
-    TOOLTOOL_DL_FLAGS="${TOOLTOOL_DL_FLAGS=} --tooltool-url=http://relengapi/tooltool/"
+    TOOLTOOL_DL_FLAGS="${TOOLTOOL_DL_FLAGS=} --tooltool-url=http://taskcluster/tooltool.mozilla-releng.net/"
 fi
 
 if [ -n "$UPLOAD_DIR" ]; then
     TOOLTOOL_DL_FLAGS="${TOOLTOOL_DL_FLAGS=} --artifact-manifest $UPLOAD_DIR/toolchains.json"
 fi
 
 : TOOLTOOL_CACHE                ${TOOLTOOL_CACHE:=/builds/worker/tooltool-cache}
 export TOOLTOOL_CACHE
--- a/taskcluster/taskgraph/actions/create_interactive.py
+++ b/taskcluster/taskgraph/actions/create_interactive.py
@@ -47,16 +47,18 @@ task. You may need to wait for it to beg
 #
 # Interactive tasks should not be able to write to any docker-worker caches.
 
 SCOPE_WHITELIST = [
     # this is not actually secret, and just about everything needs it
     re.compile(r'^secrets:get:project/taskcluster/gecko/hgfingerprint$'),
     # public downloads are OK
     re.compile(r'^docker-worker:relengapi-proxy:tooltool.download.public$'),
+    re.compile(r'^project:releng:services/tooltool/api/download/public$'),
+    re.compile(r'^project:releng:services/tooltool/api/download/internal$'),
     # level-appropriate secrets are generally necessary to run a task; these
     # also are "not that secret" - most of them are built into the resulting
     # binary and could be extracted by someone with `strings`.
     re.compile(r'^secrets:get:project/releng/gecko/build/level-[0-9]/\*'),
     # ptracing is generally useful for interactive tasks, too!
     re.compile(r'^docker-worker:feature:allowPtrace$'),
     # docker-worker capabilities include loopback devices
     re.compile(r'^docker-worker:capability:device:.*$'),
--- a/taskcluster/taskgraph/transforms/job/common.py
+++ b/taskcluster/taskgraph/transforms/job/common.py
@@ -196,17 +196,17 @@ def docker_worker_add_tooltool(config, j
         'name': 'level-%s-tooltool-cache' % level,
         'mount-point': '{workdir}/tooltool-cache'.format(**job['run']),
     })
 
     taskdesc['worker'].setdefault('env', {}).update({
         'TOOLTOOL_CACHE': '{workdir}/tooltool-cache'.format(**job['run']),
     })
 
-    taskdesc['worker']['relengapi-proxy'] = True
+    taskdesc['worker']['taskcluster-proxy'] = True
     taskdesc['scopes'].extend([
-        'docker-worker:relengapi-proxy:tooltool.download.public',
+        'project:releng:services/tooltool/api/download/public',
     ])
 
     if internal:
         taskdesc['scopes'].extend([
-            'docker-worker:relengapi-proxy:tooltool.download.internal',
+            'project:releng:services/tooltool/api/download/internal',
         ])
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -380,17 +380,16 @@ def verify_index(config, index):
         basestring,
         # an in-tree generated docker image (from `taskcluster/docker/<name>`)
         {'in-tree': basestring},
         # an indexed docker image
         {'indexed': basestring},
     ),
 
     # worker features that should be enabled
-    Required('relengapi-proxy'): bool,
     Required('chain-of-trust'): bool,
     Required('taskcluster-proxy'): bool,
     Required('allow-ptrace'): bool,
     Required('loopback-video'): bool,
     Required('loopback-audio'): bool,
     Required('docker-in-docker'): bool,  # (aka 'dind')
 
     # Paths to Docker volumes.
@@ -494,19 +493,16 @@ def build_docker_worker_payload(config, 
 
     # propagate our TASKCLUSTER_ROOT_URL to the task; note that this will soon
     # be provided directly by the worker, making this redundant:
     # https://bugzilla.mozilla.org/show_bug.cgi?id=1460015
     worker['env']['TASKCLUSTER_ROOT_URL'] = get_root_url()
 
     features = {}
 
-    if worker.get('relengapi-proxy'):
-        features['relengAPIProxy'] = True
-
     if worker.get('taskcluster-proxy'):
         features['taskclusterProxy'] = True
         worker['env']['TASKCLUSTER_PROXY_URL'] = 'http://taskcluster/'
 
     if worker.get('allow-ptrace'):
         features['allowPtrace'] = True
         task_def['scopes'].append('docker-worker:feature:allowPtrace')
 
@@ -1314,17 +1310,16 @@ def set_defaults(config, tasks):
         task.setdefault('shipping-phase', None)
         task.setdefault('shipping-product', None)
         task.setdefault('always-target', False)
         task.setdefault('optimization', None)
         task.setdefault('needs-sccache', False)
 
         worker = task['worker']
         if worker['implementation'] in ('docker-worker', 'docker-engine'):
-            worker.setdefault('relengapi-proxy', False)
             worker.setdefault('chain-of-trust', False)
             worker.setdefault('taskcluster-proxy', False)
             worker.setdefault('allow-ptrace', False)
             worker.setdefault('loopback-video', False)
             worker.setdefault('loopback-audio', False)
             worker.setdefault('docker-in-docker', False)
             worker.setdefault('volumes', [])
             worker.setdefault('env', {})
--- a/testing/mozharness/configs/android/android_common.py
+++ b/testing/mozharness/configs/android/android_common.py
@@ -12,17 +12,17 @@ config = {
         'start-emulator',
         'download-and-extract',
         'create-virtualenv',
         'verify-emulator',
         'install',
         'run-tests',
     ],
     "tooltool_cache": "/builds/worker/tooltool_cache",
-    "tooltool_servers": ['http://relengapi/tooltool/'],
+    "tooltool_servers": ['http://taskcluster/tooltool.mozilla-releng.net/'],
     "hostutils_manifest_path": "testing/config/tooltool-manifests/linux64/hostutils.manifest",
     "avds_dir": "/builds/worker/workspace/build/.android",
     "minidump_stackwalk_path": "/usr/local/bin/linux64-minidump_stackwalk",
 
     "suite_definitions": {
         "mochitest": {
             "run_filename": "runtestsremote.py",
             "testsdir": "mochitest",
--- a/testing/mozharness/configs/builds/build_pool_specifics.py
+++ b/testing/mozharness/configs/builds/build_pool_specifics.py
@@ -1,13 +1,13 @@
 # this is a dict of pool specific keys/values. As this fills up and more
 # fx build factories are ported, we might deal with this differently
 
 config = {
     "taskcluster": {
         # use the relengapi proxy to talk to tooltool
-        "tooltool_servers": ['http://relengapi/tooltool/'],
-        "tooltool_url": 'http://relengapi/tooltool/',
+        "tooltool_servers": ['http://taskcluster/tooltool.mozilla-releng.net/'],
+        "tooltool_url": 'http://taskcluster/tooltool.mozilla-releng.net/',
         'upload_env': {
             'UPLOAD_PATH': '/builds/worker/artifacts',
         },
     },
 }
--- a/testing/mozharness/configs/repackage/linux32_signed.py
+++ b/testing/mozharness/configs/repackage/linux32_signed.py
@@ -1,13 +1,13 @@
 import os
 
 platform = "linux32"
 
 config = {
     "locale": os.environ.get("LOCALE"),
 
     # ToolTool
-    "tooltool_url": 'http://relengapi/tooltool/',
+    "tooltool_url": 'http://taskcluster/tooltool.mozilla-releng.net/',
     'tooltool_cache': os.environ.get('TOOLTOOL_CACHE'),
 
     'run_configure': False,
 }
--- a/testing/mozharness/configs/repackage/linux64_signed.py
+++ b/testing/mozharness/configs/repackage/linux64_signed.py
@@ -1,13 +1,13 @@
 import os
 
 platform = "linux64"
 
 config = {
     "locale": os.environ.get("LOCALE"),
 
     # ToolTool
-    "tooltool_url": 'http://relengapi/tooltool/',
+    "tooltool_url": 'http://taskcluster/tooltool.mozilla-releng.net/',
     'tooltool_cache': os.environ.get('TOOLTOOL_CACHE'),
 
     'run_configure': False,
 }
--- a/testing/mozharness/configs/repackage/osx_partner.py
+++ b/testing/mozharness/configs/repackage/osx_partner.py
@@ -1,11 +1,11 @@
 import os
 
 config = {
     "src_mozconfig": "browser/config/mozconfigs/macosx64/repack",
 
     "repack_id": os.environ.get("REPACK_ID"),
 
     # ToolTool
-    "tooltool_url": 'http://relengapi/tooltool/',
+    "tooltool_url": 'http://taskcluster/tooltool.mozilla-releng.net/',
     'tooltool_cache': os.environ.get('TOOLTOOL_CACHE'),
 }
--- a/testing/mozharness/configs/repackage/osx_signed.py
+++ b/testing/mozharness/configs/repackage/osx_signed.py
@@ -1,11 +1,11 @@
 import os
 
 config = {
     "src_mozconfig": "browser/config/mozconfigs/macosx64/repack",
 
     "locale": os.environ.get("LOCALE"),
 
     # ToolTool
-    "tooltool_url": 'http://relengapi/tooltool/',
+    "tooltool_url": 'http://taskcluster/tooltool.mozilla-releng.net/',
     'tooltool_cache': os.environ.get('TOOLTOOL_CACHE'),
 }
--- a/testing/mozharness/configs/single_locale/tc_android-api-16.py
+++ b/testing/mozharness/configs/single_locale/tc_android-api-16.py
@@ -10,17 +10,17 @@ config = {
 
     'vcs_share_base': "/builds/hg-shared",
 
     "mozconfig": "src/mobile/android/config/mozconfigs/android-api-16/l10n-nightly",
     "tooltool_config": {
         "manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
         "output_dir": "%(abs_work_dir)s/src",
     },
-    "tooltool_servers": ['http://relengapi/tooltool/'],
+    "tooltool_servers": ['http://taskcluster/tooltool.mozilla-releng.net/'],
 
     "upload_env": {
         'UPLOAD_PATH': '/builds/worker/artifacts/',
     },
     'secret_files': [
         {'filename': '/builds/gapi.data',
          'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/gapi.data',
          'min_scm_level': 1},
--- a/testing/mozharness/configs/single_locale/tc_macosx64.py
+++ b/testing/mozharness/configs/single_locale/tc_macosx64.py
@@ -8,13 +8,13 @@ config = {
         "DIST": "%(abs_objdir)s",
         "L10NBASEDIR": "../../l10n",
         'TOOLTOOL_CACHE': os.environ.get('TOOLTOOL_CACHE'),
     },
     "upload_env": {
         'UPLOAD_PATH': '/builds/worker/artifacts/',
     },
 
-    "tooltool_url": 'http://relengapi/tooltool/',
+    "tooltool_url": 'http://taskcluster/tooltool.mozilla-releng.net/',
 
     "vcs_share_base": "/builds/hg-shared",
 }