Bug 1275943 - Ensure job tasks are added to target set even if no try syntax specified, r?dustin draft
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Mon, 14 Nov 2016 14:29:50 -0500
changeset 438568 636c799fdab80185e2b73eae9e582a7251917062
parent 438429 458c900dd4ef310d5bffae1f2bb97da50839cc66
child 438616 712b3e5ad973ff9ed76d92fdab1c6a32e52ad7b9
push id35765
push userahalberstadt@mozilla.com
push dateMon, 14 Nov 2016 19:53:33 +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