Bug 1383880: parse try config during the decision task; r=ahal

This sets the try_mode property, and parses the try message (if given), early
in the decision task and puts the results into the parameters.

The proximate need is to set optimze_target_tasks for some try modes and not
others. This also replaces the existing logic for parsing messages for certain
kinds, and makes the distinction between the different try modes a little
clearer.

MozReview-Commit-ID: AXJEGLh6pEV
This commit is contained in:
Dustin J. Mitchell
2017-08-21 23:14:14 +00:00
parent a8cf91e988
commit 40fa2c8f48
16 changed files with 277 additions and 200 deletions

View File

@@ -21,20 +21,16 @@ PARAMETER_NAMES = set([
'include_nightly',
'level',
'message',
'morph_templates',
'moz_build_date',
'optimize_target_tasks',
'owner',
'project',
'pushdate',
'pushlog_id',
'target_task_labels',
'target_tasks_method',
])
TRY_ONLY_PARAMETERS = set([
'morph_templates',
'target_task_labels',
'try_mode',
'try_options',
'try_task_config',
])
@@ -44,7 +40,7 @@ class Parameters(ReadOnlyDict):
names = set(self)
msg = []
missing = PARAMETER_NAMES - TRY_ONLY_PARAMETERS - names
missing = PARAMETER_NAMES - names
if missing:
msg.append("missing parameters: " + ", ".join(missing))