No bug: [taskgraph] Extract common setting from try_options to try_task_config in parameters; r=ahal
There are a number of settings that have equivalent expressions in `try_options` (used for try syntax) and `try_task_config` (used for other try selectors). Rather than requiring task generation code to understand both formats, this converts the try syntax specification to `try_task_config` at parameter generation time. Differential Revision: https://phabricator.services.mozilla.com/D66536
This commit is contained in:
@@ -219,7 +219,16 @@ def parse_message(message):
|
||||
# In order to run test jobs multiple times
|
||||
parser.add_argument('--rebuild', dest='trigger_tests', type=int, default=1)
|
||||
args, _ = parser.parse_known_args(parts)
|
||||
return vars(args)
|
||||
|
||||
try_options = vars(args)
|
||||
try_task_config = {
|
||||
"use-artifact-builds": try_options.pop("artifact"),
|
||||
"gecko-profile": try_options.pop("profile"),
|
||||
}
|
||||
return {
|
||||
"try_options": try_options,
|
||||
"try_task_config": try_task_config,
|
||||
}
|
||||
|
||||
|
||||
class TryOptionSyntax(object):
|
||||
@@ -239,7 +248,6 @@ class TryOptionSyntax(object):
|
||||
- notifications: either None if no notifications or one of 'all' or 'failure'
|
||||
- talos_trigger_tests: the number of time talos tests should be triggered (--rebuild-talos)
|
||||
- env: additional environment variables (ENV=value)
|
||||
- profile: run talos in profile mode
|
||||
- tag: restrict tests to the specified tag
|
||||
- no_retry: do not retry failed jobs
|
||||
|
||||
@@ -265,10 +273,8 @@ class TryOptionSyntax(object):
|
||||
self.talos_trigger_tests = 0
|
||||
self.raptor_trigger_tests = 0
|
||||
self.env = []
|
||||
self.profile = False
|
||||
self.tag = None
|
||||
self.no_retry = False
|
||||
self.artifact = False
|
||||
|
||||
options = parameters['try_options']
|
||||
if not options:
|
||||
@@ -286,10 +292,8 @@ class TryOptionSyntax(object):
|
||||
self.talos_trigger_tests = options['talos_trigger_tests']
|
||||
self.raptor_trigger_tests = options['raptor_trigger_tests']
|
||||
self.env = options['env']
|
||||
self.profile = options['profile']
|
||||
self.tag = options['tag']
|
||||
self.no_retry = options['no_retry']
|
||||
self.artifact = options['artifact']
|
||||
self.include_nightly = options['include_nightly']
|
||||
|
||||
self.test_tiers = self.generate_test_tiers(full_task_graph)
|
||||
@@ -683,8 +687,6 @@ class TryOptionSyntax(object):
|
||||
"talos_trigger_tests: " + str(self.talos_trigger_tests),
|
||||
"raptor_trigger_tests: " + str(self.raptor_trigger_tests),
|
||||
"env: " + str(self.env),
|
||||
"profile: " + str(self.profile),
|
||||
"tag: " + str(self.tag),
|
||||
"no_retry: " + str(self.no_retry),
|
||||
"artifact: " + str(self.artifact),
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user