Bug 1384905 - Take 2 - [tc-migration] Windows 8 should not be triggered on try (unless specified) r=dustin
authorJustin Wood <Callek@gmail.com>
Fri, 28 Jul 2017 14:45:40 -0400
changeset 420559 bd0071cbb121acba0ae2bc3db0cf4596c8995ee9
parent 420558 755215a3b81f07056d8df1873209413c2b8fa394
child 420560 1955c9d3718617f9d37c689a7e845ef97e56abf3
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1384905
milestone56.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 1384905 - Take 2 - [tc-migration] Windows 8 should not be triggered on try (unless specified) r=dustin The first version of the patch didn't account for the fact that if we did -p all we still couldn't do -u foo[Windows 8] specifically: -p all means self.platforms is None https://hg.mozilla.org/mozilla-central/file/16ffc1d05422/taskcluster/taskgraph/try_option_syntax.py#l563 Then we check if the *test* has a run_on_projects that has either `all` or `try`, it doesn't so we abort. In new code, we merely set a flag to say don't-run-me-by-default and use that in a few places. MozReview-Commit-ID: 6rjNVZvpYGA
taskcluster/taskgraph/try_option_syntax.py
--- a/taskcluster/taskgraph/try_option_syntax.py
+++ b/taskcluster/taskgraph/try_option_syntax.py
@@ -553,40 +553,43 @@ class TryOptionSyntax(object):
         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', []))
 
         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:
                 if not check_run_on_projects():
-                    return False
+                    run_by_default = False
             if try_spec is None:
-                return True
+                return run_by_default
             # TODO: optimize this search a bit
             for test in try_spec:
                 if attr(attr_name) == test['test']:
                     break
             else:
                 return False
             if 'only_chunks' in test and attr('test_chunk') not in test['only_chunks']:
                 return False
             if 'platforms' in test:
                 platform = attr('test_platform', '').split('/')[0]
                 # Platforms can be forced by syntax like "-u xpcshell[Windows 8]"
                 return platform in test['platforms']
+            elif run_by_default:
+                return check_run_on_projects()
             else:
-                return check_run_on_projects()
+                return False
 
         job_try_name = attr('job_try_name')
         if job_try_name:
             # Beware the subtle distinction between [] and None for self.jobs and self.platforms.
             # They will be [] if there was no try syntax, and None if try syntax was detected but
             # they remained unspecified.
             if self.jobs and job_try_name not in self.jobs:
                 return False