Bug 1650406 - [taskgraph] Never run 'upload-symbols' tasks with |mach try auto|, r=marco

Differential Revision: https://phabricator.services.mozilla.com/D88874
This commit is contained in:
Andrew Halberstadt 2020-09-02 20:20:26 +00:00
parent b995cc5a0c
commit 8f45b2b0d4
4 changed files with 9 additions and 5 deletions

View File

@ -494,6 +494,7 @@ register_strategy('build-fuzzing', args=('push-interval-10', 'backstop'))(All)
register_strategy('test', args=('skip-unless-schedules',))(Alias) register_strategy('test', args=('skip-unless-schedules',))(Alias)
register_strategy('test-inclusive', args=('skip-unless-schedules',))(Alias) register_strategy('test-inclusive', args=('skip-unless-schedules',))(Alias)
register_strategy('test-verify', args=('skip-unless-schedules',))(Alias) register_strategy('test-verify', args=('skip-unless-schedules',))(Alias)
register_strategy('upload-symbols', args=('never',))(Alias)
# Strategy overrides used to tweak the default strategies. These are referenced # Strategy overrides used to tweak the default strategies. These are referenced
@ -673,4 +674,5 @@ tryselect = ExperimentalOverride(experimental, {
'build': Any('skip-unless-schedules', 'bugbug-reduced', split_args=split_bugbug_arg), 'build': Any('skip-unless-schedules', 'bugbug-reduced', split_args=split_bugbug_arg),
'build-fuzzing': Alias('bugbug-reduced'), 'build-fuzzing': Alias('bugbug-reduced'),
'test-verify': 'base:test', 'test-verify': 'base:test',
'upload-symbols': Alias('always'),
}) })

View File

@ -75,6 +75,7 @@ def fill_template(config, tasks):
# We only want to run these tasks if the build is run. # We only want to run these tasks if the build is run.
# XXX Better to run this on promote phase instead? # XXX Better to run this on promote phase instead?
task['run-on-projects'] = dep.attributes.get('run_on_projects') task['run-on-projects'] = dep.attributes.get('run_on_projects')
task['optimization'] = {'upload-symbols': None}
task['if-dependencies'] = ['build'] task['if-dependencies'] = ['build']
# clear out the stuff that's not part of a task description # clear out the stuff that's not part of a task description

View File

@ -226,6 +226,9 @@ OptimizationSchema = voluptuous.Any(
# search the index for the given index namespaces, and replace this task if found # search the index for the given index namespaces, and replace this task if found
# the search occurs in order, with the first match winning # the search occurs in order, with the first match winning
{'index-search': [text_type]}, {'index-search': [text_type]},
# never optimize this task
{'never': None},
# skip the task except for every Nth push
{'push-interval-10': None}, {'push-interval-10': None},
{'push-interval-20': None}, {'push-interval-20': None},
# skip this task if none of the given file patterns match # skip this task if none of the given file patterns match
@ -237,6 +240,8 @@ OptimizationSchema = voluptuous.Any(
{'test-inclusive': list(schedules.ALL_COMPONENTS)}, {'test-inclusive': list(schedules.ALL_COMPONENTS)},
# optimize strategy alias for test-verify tasks # optimize strategy alias for test-verify tasks
{'test-verify': list(schedules.ALL_COMPONENTS)}, {'test-verify': list(schedules.ALL_COMPONENTS)},
# optimize strategy alias for upload-symbols tasks
{'upload-symbols': None},
) )
# shortcut for a string where task references are allowed # shortcut for a string where task references are allowed

View File

@ -71,11 +71,7 @@ def test_only_important_manifests(params, full_task_graph, filter_tasks):
id="no build-signing", id="no build-signing",
marks=pytest.mark.xfail, marks=pytest.mark.xfail,
), ),
pytest.param( pytest.param(lambda t: t.kind == "upload-symbols", id="no upload-symbols",),
lambda t: t.kind == "upload-symbols",
id="no upload-symbols",
marks=pytest.mark.xfail,
),
), ),
) )
def test_tasks_are_not_scheduled(optimized_task_graph, filter_tasks, func): def test_tasks_are_not_scheduled(optimized_task_graph, filter_tasks, func):