No bug: Handle unicode output from docker builds; r=dustin
authorTom Prince <mozilla@hocat.ca>
Thu, 25 Apr 2019 15:49:33 +0000
changeset 530143 8218cc92ee8d4527c3dd19da32b516c420d75a25
parent 530142 2fb18533192ec35ca71374439938757a5bc008cd
child 530144 def772263e58819da4b777d99625496d2b87d848
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
milestone68.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
No bug: Handle unicode output from docker builds; r=dustin This is not strictly required in mozilla-central, as `mach` sets the encoding of the output to UTF-8. Differential Revision: https://phabricator.services.mozilla.com/D28861
taskcluster/taskgraph/util/docker.py
--- a/taskcluster/taskgraph/util/docker.py
+++ b/taskcluster/taskgraph/util/docker.py
@@ -98,17 +98,17 @@ def post_to_docker(tar, api_path, **kwar
                     # Only print status changes.
                     if status != data['status']:
                         sys.stderr.write('{}: {}\n'.format(data['id'], data['status']))
                         status_line[data['id']] = data['status']
             else:
                 status_line = {}
                 sys.stderr.write('{}\n'.format(data['status']))
         elif 'stream' in data:
-            sys.stderr.write(data['stream'])
+            sys.stderr.write(data['stream'].encode("utf-8"))
         elif 'aux' in data:
             sys.stderr.write(repr(data['aux']))
         elif 'error' in data:
             sys.stderr.write('{}\n'.format(data['error']))
             # Sadly, docker doesn't give more than a plain string for errors,
             # so the best we can do to propagate the error code from the command
             # that failed is to parse the error message...
             errcode = 1