Bug 1551957 - Allow for osx 10.14 in CI for source tasks. r=ahal
authorJoel Maher <jmaher@mozilla.com>
Wed, 15 May 2019 21:04:57 +0000
changeset 532820 f60174a073074838ef9142cd11cd4395aed7b5df
parent 532819 d9a6ddf122884cf34e3fc650d2b21a4ab5076124
child 532821 e6d06a5ffa07fa63ae2aa747c6f6877029a370cf
push id11272
push userapavel@mozilla.com
push dateThu, 16 May 2019 15:28:22 +0000
treeherdermozilla-beta@2265bfc5920d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1551957
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
Bug 1551957 - Allow for osx 10.14 in CI for source tasks. r=ahal Allow for osx 10.14 in CI for source tasks. Differential Revision: https://phabricator.services.mozilla.com/D31297
taskcluster/scripts/run-task
taskcluster/taskgraph/transforms/job/mach.py
taskcluster/taskgraph/transforms/job/python_test.py
taskcluster/taskgraph/transforms/job/run_task.py
--- a/taskcluster/scripts/run-task
+++ b/taskcluster/scripts/run-task
@@ -22,27 +22,27 @@ if sys.version_info[0:2] < (3, 5):
 
 
 import argparse
 import datetime
 import errno
 import io
 import json
 import os
+import platform
 import random
 import re
 import shutil
 import socket
 import stat
 import subprocess
 
 import urllib.error
 import urllib.request
 
-
 FINGERPRINT_URL = 'http://taskcluster/secrets/v1/secret/project/taskcluster/gecko/hgfingerprint'
 FALLBACK_FINGERPRINT = {
     'fingerprints':
         "sha256:17:38:aa:92:0b:84:3e:aa:8e:52:52:e9:4c:2f:98:a9:0e:bf:6c:3e:e9"
         ":15:ff:0a:29:80:f7:06:02:5b:e8:48"}
 
 HGMOINTERNAL_CONFIG_URL = 'http://taskcluster/secrets/v1/secret/project/taskcluster/gecko/hgmointernal'
 
@@ -400,17 +400,22 @@ def vcs_checkout(source_repo, dest, stor
     elif branch:
         revision_flag = '--branch'
         revision_value = branch
     else:
         print('revision is not specified for checkout')
         sys.exit(1)
 
     if IS_MACOSX:
+        release = platform.mac_ver()
+        versionNums = release[0].split('.')[:2]
+        os_version = "%s.%s" % (versionNums[0], versionNums[1])
         hg_bin = '/tools/python27-mercurial/bin/hg'
+        if os_version == "10.14":
+            hg_bin = 'hg'
     elif IS_POSIX:
         hg_bin = 'hg'
     elif IS_WINDOWS:
         # This is where OCC installs it in the AMIs.
         hg_bin = r'C:\Program Files\Mercurial\hg.exe'
         if not os.path.exists(hg_bin):
             print('could not find Mercurial executable: %s' % hg_bin)
             sys.exit(1)
--- a/taskcluster/taskgraph/transforms/job/mach.py
+++ b/taskcluster/taskgraph/transforms/job/mach.py
@@ -39,16 +39,19 @@ defaults = {
 
 
 @run_job_using("docker-worker", "mach", schema=mach_schema, defaults=defaults)
 @run_job_using("generic-worker", "mach", schema=mach_schema, defaults=defaults)
 def configure_mach(config, job, taskdesc):
     run = job['run']
 
     command_prefix = 'cd $GECKO_PATH && ./mach '
+    if job['worker-type'].endswith('1014'):
+        command_prefix = 'cd $GECKO_PATH && LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 ./mach '
+
     mach = run['mach']
     if isinstance(mach, dict):
         ref, pattern = next(iter(mach.items()))
         command = {ref: command_prefix + pattern}
     else:
         command = command_prefix + mach
 
     # defer to the run_task implementation
--- a/taskcluster/taskgraph/transforms/job/python_test.py
+++ b/taskcluster/taskgraph/transforms/job/python_test.py
@@ -35,15 +35,17 @@ defaults = {
 @run_job_using('generic-worker', 'python-test', schema=python_test_schema, defaults=defaults)
 def configure_python_test(config, job, taskdesc):
     run = job['run']
     worker = job['worker']
 
     if worker['os'] == 'macosx' and run['python-version'] == 3:
         # OSX hosts can't seem to find python 3 on their own
         run['python-version'] = '/tools/python36/bin/python3.6'
+        if job['worker-type'].endswith('1014'):
+            run['python-version'] = '/usr/local/bin/python3'
 
     # defer to the mach implementation
     run['mach'] = 'python-test --python {python-version} --subsuite {subsuite}'.format(**run)
     run['using'] = 'mach'
     del run['python-version']
     del run['subsuite']
     configure_taskdesc_for_run(config, job, taskdesc, worker['implementation'])
--- a/taskcluster/taskgraph/transforms/job/run_task.py
+++ b/taskcluster/taskgraph/transforms/job/run_task.py
@@ -125,16 +125,18 @@ def generic_worker_run_task(config, job,
     worker = taskdesc['worker'] = job['worker']
     is_win = worker['os'] == 'windows'
     is_mac = worker['os'] == 'macosx'
 
     if is_win:
         command = ['C:/mozilla-build/python3/python3.exe', 'run-task']
     elif is_mac:
         command = ['/tools/python36/bin/python3.6', 'run-task']
+        if job['worker-type'].endswith('1014'):
+            command = ['/usr/local/bin/python3', 'run-task']
     else:
         command = ['./run-task']
 
     common_setup(config, job, taskdesc, command)
 
     worker.setdefault('mounts', [])
     if run.get('cache-dotcache'):
         worker['mounts'].append({