Bug 1473048 - Prevent code coverage builds from running when using try option syntax. r=ahal
authorGreg Mierzwinski <gmierz1@live.ca>
Wed, 22 Aug 2018 20:45:51 +0000
changeset 488119 bdd6d0de763d0f190ba71a10493467a41f69dc70
parent 488118 9fcfb36da6fe80f1b1647700eb2e9b55d5db9a07
child 488120 c847a2f8b428fa60e5d74bb0db824b88e17dff8b
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1473048
milestone63.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 1473048 - Prevent code coverage builds from running when using try option syntax. r=ahal This patch completely disables *ccov, and *jsdcov builds and tests when scheduling them through try option syntax as these build variations use a lot of resources and are rarely needed to be scheduled. The only way to schedule code coverage from now on will be with the |mach try fuzzy| tool. Differential Revision: https://phabricator.services.mozilla.com/D3921
taskcluster/taskgraph/transforms/tests.py
taskcluster/taskgraph/try_option_syntax.py
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -730,17 +730,17 @@ def handle_suite_category(config, tests)
         yield test
 
 
 @transforms.add
 def enable_code_coverage(config, tests):
     """Enable code coverage for the ccov and jsdcov build-platforms"""
     for test in tests:
         if 'ccov' in test['build-platform']:
-            # do not run tests on fuzzing or opt build
+            # Do not run tests on fuzzing or opt build
             if 'opt' in test['build-platform'] or 'fuzzing' in test['build-platform']:
                 test['run-on-projects'] = []
                 continue
             # Skip this transform for android code coverage builds.
             if 'android' in test['build-platform']:
                 test.setdefault('fetches', {}).setdefault('fetch', []).append('grcov-linux-x86_64')
                 test['mozharness'].setdefault('extra-options', []).append('--java-code-coverage')
                 yield test
@@ -781,17 +781,17 @@ def enable_code_coverage(config, tests):
                 test['mozharness']['extra-options'].append('--add-option')
                 test['mozharness']['extra-options'].append('--no-upload-results')
                 test['mozharness']['extra-options'].append('--add-option')
                 test['mozharness']['extra-options'].append('--tptimeout,15000')
             if 'raptor' in test['test-name']:
                 test['max-run-time'] = 1800
                 if 'linux' in test['build-platform']:
                     test['docker-image'] = {"in-tree": "desktop1604-test"}
-        elif test['build-platform'] == 'linux64-jsdcov/opt':
+        elif 'jsdcov' in test['build-platform']:
             # Ensure we always run on the projects defined by the build, unless the test
             # is try only or shouldn't run at all.
             if test['run-on-projects'] not in [[], ['try']]:
                 test['run-on-projects'] = 'built-projects'
             test['mozharness'].setdefault('extra-options', []).append('--jsd-code-coverage')
         yield test
 
 
--- a/taskcluster/taskgraph/try_option_syntax.py
+++ b/taskcluster/taskgraph/try_option_syntax.py
@@ -545,16 +545,20 @@ class TryOptionSyntax(object):
     def task_matches(self, task):
         attr = task.attributes.get
 
         def check_run_on_projects():
             if attr('nightly') and not self.include_nightly:
                 return False
             return set(['try', 'all']) & set(attr('run_on_projects', []))
 
+        # Don't schedule code coverage when try option syntax is used
+        if 'ccov' in attr('build_platform', []) or 'jsdcov' in attr('build_platform', []):
+            return False
+
         def match_test(try_spec, attr_name):
             run_by_default = True
             if attr('build_type') not in self.build_types:
                 return False
             if self.platforms is not None:
                 if attr('build_platform') not in self.platforms:
                     return False
             else:
@@ -588,18 +592,18 @@ class TryOptionSyntax(object):
 
             # User specified `-j all`
             if self.platforms is not None and attr('build_platform') not in self.platforms:
                 return False  # honor -p for jobs governed by a platform
             # "all" means "everything with `try` in run_on_projects"
             return check_run_on_projects()
         elif attr('kind') == 'test':
             return match_test(self.unittests, 'unittest_try_name') \
-                 or match_test(self.talos, 'talos_try_name') \
-                 or match_test(self.raptor, 'raptor_try_name')
+                or match_test(self.talos, 'talos_try_name') \
+                or match_test(self.raptor, 'raptor_try_name')
         elif attr('kind') in BUILD_KINDS:
             if attr('build_type') not in self.build_types:
                 return False
             elif self.platforms is None:
                 # for "-p all", look for try in the 'run_on_projects' attribute
                 return check_run_on_projects()
             else:
                 if attr('build_platform') not in self.platforms: