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
--- 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