Bug 1275943 - Ensure job tasks are added to target set even if no try syntax specified, r=dustin
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Mon, 14 Nov 2016 14:29:50 -0500
changeset 439665 c3b28797c209b71e2e966dc41bd0c228ba3196df
parent 439664 7d6d40b8751d9cb1cb950fe9a7fe130a46f66f6c
child 439666 429e0bd037aaaad037d9d8315bca0f04fae11928
push id36064
push userrthijssen@mozilla.com
push dateWed, 16 Nov 2016 13:38:27 +0000
reviewersdustin
bugs1275943
milestone53.0a1
Bug 1275943 - Ensure job tasks are added to target set even if no try syntax specified, r=dustin Job tasks are tasks that are not tied to a specific build or test. As such, they cannot be scheduled with the regular -p/-u try syntax options. There exists a -j try syntax option, to schedule them, which defaults to running "all" of them if not specified. However, there is a bug here where they will only default to "all" if a try syntax exists in the commit message. They will not be considered if a developer pushes to try without a try syntax. This happens because self.jobs is initially initialized with '[]' and we use None to determine when to schedule "all" later on. I want to move towards a world without try syntax, so we should start improving the UX of the no try syntax use case. Note: When I say "schedule" here, I mean added to the target set. They may still be optimized away. MozReview-Commit-ID: 4TrC84RGiaL
taskcluster/taskgraph/try_option_syntax.py
--- a/taskcluster/taskgraph/try_option_syntax.py
+++ b/taskcluster/taskgraph/try_option_syntax.py
@@ -520,17 +520,18 @@ class TryOptionSyntax(object):
                 return False
             if 'only_chunks' in test and attr('test_chunk') not in test['only_chunks']:
                 return False
             return True
 
         if attr('kind') in ('desktop-test', 'android-test'):
             return match_test(self.unittests, 'unittest_try_name')
         elif attr('kind') in JOB_KINDS:
-            if self.jobs is None:
+            # This will add 'job' tasks to the target set even if no try syntax was specified.
+            if not self.jobs:
                 return True
             if attr('build_platform') in self.jobs:
                 return True
         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