Bug 1532893 - Retry packages tasks when snapshot.debian.org doesn't respond. r=dustin
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 06 Mar 2019 22:14:20 +0000
changeset 520979 615a12a9276839868bef0858f3fb535a04106295
parent 520978 29168c60c4e65cf36d5df9787e1bcfca038ac31c
child 520980 ccb173c2766838a1ef52bbf590947565398928fb
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1532893, 1486071
milestone67.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 1532893 - Retry packages tasks when snapshot.debian.org doesn't respond. r=dustin Bug 1486071 intended to fix this, but while the tasks are setup to restart on exit status 100, there are multiple failure cases where snapshot.debian.org doesn't respond and the exit status is not 100. One is dget, when downloading package sources from snapshot.debian.org. Eventually, those should move to fetch tasks, but in the meantime, we bubble up get errors with an exit code 100. mk-build-deps wraps a call to apt-get install, but doesn't return the exit code that apt-get returns when apt-get returns one. It makes it hard to distinguish the error modes, but mk-build-deps is unlikely to fail on anything else than apt-get. Not all apt-get failures would be due to snapshot.debian.org availability, but that's a tradeoff we decided was okay in bug 1486071. Differential Revision: https://phabricator.services.mozilla.com/D22269
taskcluster/taskgraph/transforms/job/debian_package.py
--- a/taskcluster/taskgraph/transforms/job/debian_package.py
+++ b/taskcluster/taskgraph/transforms/job/debian_package.py
@@ -154,24 +154,24 @@ def docker_worker_debian_package(config,
         '-c',
         # Add sources for packages coming from other package tasks.
         '/usr/local/sbin/setup_packages.sh {queue_url} $PACKAGES && '
         'apt-get update && '
         # Upgrade packages that might have new versions in package tasks.
         'apt-get dist-upgrade && '
         'cd /tmp && '
         # Get, validate and extract the package source.
-        'dget -d -u {src_url} && '
+        '(dget -d -u {src_url} || exit 100) && '
         'echo "{src_sha256}  {src_file}" | sha256sum -c && '
         '{unpack} && '
         'cd {package} && '
         # Optionally apply patch and/or pre-build command.
         '{adjust}'
         # Install the necessary build dependencies.
-        'mk-build-deps -i -r debian/control -t \'{resolver}\' && '
+        '(mk-build-deps -i -r debian/control -t \'{resolver}\' || exit 100) && '
         # Build the package
         'DEB_BUILD_OPTIONS="parallel=$(nproc) nocheck" dpkg-buildpackage && '
         # Copy the artifacts
         'mkdir -p {artifacts}/debian && '
         'dcmd cp ../{package}_*.changes {artifacts}/debian/ && '
         'cd {artifacts} && '
         # Make the artifacts directory usable as an APT repository.
         'apt-ftparchive sources debian | gzip -c9 > debian/Sources.gz && '