Bug 1573435 - Use toolchain fetches for diffoscope tasks. r=nalexander
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 13 Aug 2019 16:51:17 +0900
changeset 488144 ef9aa40a25e1c69108af7f2b9a245db991953691
parent 488143 a90eaeb660775d216ab0c011687a9c15dbf7ee59
child 488145 874a06471c7ae2d9847ac3a1a9f562a16b903683
push id36435
push usercbrindusan@mozilla.com
push dateThu, 15 Aug 2019 09:46:49 +0000
treeherdermozilla-central@0db07ff50ab5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1573435
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1573435 - Use toolchain fetches for diffoscope tasks. r=nalexander Differential Revision: https://phabricator.services.mozilla.com/D41736
taskcluster/ci/diffoscope/kind.yml
taskcluster/docker/diffoscope/get_and_diffoscope
taskcluster/taskgraph/transforms/diffoscope.py
--- a/taskcluster/ci/diffoscope/kind.yml
+++ b/taskcluster/ci/diffoscope/kind.yml
@@ -5,17 +5,16 @@
 loader: taskgraph.loader.transform:loader
 
 kind-dependencies:
     - build
     - toolchain
 
 transforms:
     - taskgraph.transforms.diffoscope:transforms
-    - taskgraph.transforms.use_toolchains:transforms
     - taskgraph.transforms.job:transforms
     - taskgraph.transforms.task:transforms
 
 # Note: --exclude-command .--line-numbers is because of
 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879003
 # That skips `objdump --disassemble --line-numbers` and falls back to
 # `objdump --disassemble`
 # Note: the .chk excludes are for files that are known to differ between
--- a/taskcluster/docker/diffoscope/get_and_diffoscope
+++ b/taskcluster/docker/diffoscope/get_and_diffoscope
@@ -6,49 +6,37 @@ set -x
 cd /builds/worker
 
 mkdir a b
 
 # Until https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879010 is
 # implemented, it's better to first manually extract the data.
 # Plus dmg files are not supported yet.
 
-# duplicate the functionality of taskcluster-lib-urls, but in bash..
-if [ "$TASKCLUSTER_ROOT_URL" = "https://taskcluster.net" ]; then
-    queue_base='https://queue.taskcluster.net/v1'
-else
-    queue_base="$TASKCLUSTER_ROOT_URL/api/queue/v1"
-fi
-
 case "$ORIG_URL" in
 */target.zip|*/target.apk)
 	curl -L "$ORIG_URL" > a.zip
 	curl -L "$NEW_URL" > b.zip
 	unzip -d a a.zip
 	unzip -d b b.zip
 	;;
 */target.tar.bz2)
 	curl -L "$ORIG_URL" | tar -C a -jxf -
 	curl -L "$NEW_URL" | tar -C b -jxf -
 	;;
 */target.dmg)
-	# We don't have mach available to call mach artifact toolchain.
-	# This is the trivial equivalent for those toolchains we use here.
-	for t in $MOZ_TOOLCHAINS; do
-		curl -L $queue_base/task/${t#*@}/artifacts/${t%@*} | tar -Jxf -
-	done
 	for tool in lipo otool; do
-		ln -s /builds/worker/cctools/bin/x86_64-apple-darwin*-$tool bin/$tool
+		ln -s $MOZ_FETCHES_DIR/cctools/bin/x86_64-apple-darwin*-$tool bin/$tool
 	done
 	export PATH=$PATH:/builds/worker/bin
 	curl -L "$ORIG_URL" > a.dmg
 	curl -L "$NEW_URL" > b.dmg
 	for i in a b; do
-		dmg/dmg extract $i.dmg $i.hfs
-		dmg/hfsplus $i.hfs extractall / $i
+		$MOZ_FETCHES_DIR/dmg/dmg extract $i.dmg $i.hfs
+		$MOZ_FETCHES_DIR/dmg/hfsplus $i.hfs extractall / $i
 	done
 	;;
 esac
 
 case "$ORIG_URL" in
 */target.apk)
 	OMNIJAR=assets/omni.ja
 	;;
--- a/taskcluster/taskgraph/transforms/diffoscope.py
+++ b/taskcluster/taskgraph/transforms/diffoscope.py
@@ -152,14 +152,14 @@ def fill_template(config, tasks):
                     ' --unpack' if task.get('unpack') else '',
                     ' --fail' if task.get('fail-on-diff') else '',
                 ),
             },
             'dependencies': deps,
         }
 
         if artifact.endswith('.dmg'):
-            taskdesc['toolchains'] = [
+            taskdesc.setdefault('fetches', {}).setdefault('toolchain', []).extend([
                 'linux64-cctools-port',
                 'linux64-libdmg',
-            ]
+            ])
 
         yield taskdesc