Bug 1498019: [release] Don't set shipping phase based on target_tasks; r=aki

The phase of a task doesn't depend on which phase graph it is being generated in.

Differential Revision: https://phabricator.services.mozilla.com/D8303

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tom Prince 2018-10-10 23:08:18 +00:00
Родитель e2b78fe22a
Коммит d9d6f34977
8 изменённых файлов: 47 добавлений и 61 удалений

Просмотреть файл

@ -5,25 +5,28 @@
loader: taskgraph.loader.single_dep:loader
transforms:
- taskgraph.transforms.beetmover_l10n:transforms
- taskgraph.transforms.name_sanity:transforms
- taskgraph.transforms.beetmover:transforms
- taskgraph.transforms.task:transforms
- taskgraph.transforms.beetmover_l10n:transforms
- taskgraph.transforms.name_sanity:transforms
- taskgraph.transforms.beetmover:transforms
- taskgraph.transforms.task:transforms
kind-dependencies:
- nightly-l10n-signing
- nightly-l10n-signing
only-for-attributes:
- nightly
- nightly
not-for-build-platforms:
- linux-nightly/opt
- linux64-nightly/opt
- macosx64-nightly/opt
- win32-nightly/opt
- win64-nightly/opt
- linux-devedition-nightly/opt
- linux64-devedition-nightly/opt
- macosx64-devedition-nightly/opt
- win32-devedition-nightly/opt
- win64-devedition-nightly/opt
- linux-nightly/opt
- linux64-nightly/opt
- macosx64-nightly/opt
- win32-nightly/opt
- win64-nightly/opt
- linux-devedition-nightly/opt
- linux64-devedition-nightly/opt
- macosx64-devedition-nightly/opt
- win32-devedition-nightly/opt
- win64-devedition-nightly/opt
job-template:
shipping-phase: promote

Просмотреть файл

@ -5,26 +5,29 @@
loader: taskgraph.loader.single_dep:loader
transforms:
- taskgraph.transforms.name_sanity:transforms
- taskgraph.transforms.beetmover:transforms
- taskgraph.transforms.task:transforms
- taskgraph.transforms.name_sanity:transforms
- taskgraph.transforms.beetmover:transforms
- taskgraph.transforms.task:transforms
kind-dependencies:
- build-signing
- build-signing
only-for-attributes:
- nightly
- nightly
not-for-build-platforms:
- linux-nightly/opt
- linux64-nightly/opt
- macosx64-nightly/opt
- win32-nightly/opt
- win64-nightly/opt
- linux-devedition-nightly/opt
- linux64-devedition-nightly/opt
- macosx64-devedition-nightly/opt
- win32-devedition-nightly/opt
- win64-devedition-nightly/opt
- linux64-asan-reporter-nightly/opt
- win64-asan-reporter-nightly/opt
- linux-nightly/opt
- linux64-nightly/opt
- macosx64-nightly/opt
- win32-nightly/opt
- win64-nightly/opt
- linux-devedition-nightly/opt
- linux64-devedition-nightly/opt
- macosx64-devedition-nightly/opt
- win32-devedition-nightly/opt
- win64-devedition-nightly/opt
- linux64-asan-reporter-nightly/opt
- win64-asan-reporter-nightly/opt
job-template:
shipping-phase: promote

Просмотреть файл

@ -12,7 +12,6 @@ from taskgraph.util.attributes import copy_attributes_from_dependent_job
from taskgraph.util.schema import validate_schema, Schema
from taskgraph.util.scriptworker import (get_beetmover_bucket_scope,
get_beetmover_action_scope,
get_phase,
get_worker_type_for_scope)
from taskgraph.util.taskcluster import get_artifact_prefix
from taskgraph.transforms.task import task_description_schema
@ -140,7 +139,7 @@ beetmover_description_schema = Schema({
# locale is passed only for l10n beetmoving
Optional('locale'): basestring,
Optional('shipping-phase'): task_description_schema['shipping-phase'],
Required('shipping-phase'): task_description_schema['shipping-phase'],
Optional('shipping-product'): task_description_schema['shipping-product'],
})
@ -198,7 +197,6 @@ def make_task_description(config, jobs):
bucket_scope = get_beetmover_bucket_scope(config)
action_scope = get_beetmover_action_scope(config)
phase = get_phase(config)
task = {
'label': label,
@ -209,7 +207,7 @@ def make_task_description(config, jobs):
'attributes': attributes,
'run-on-projects': dep_job.attributes.get('run_on_projects'),
'treeherder': treeherder,
'shipping-phase': phase,
'shipping-phase': job['shipping-phase'],
}
yield task

Просмотреть файл

@ -12,8 +12,7 @@ from taskgraph.transforms.beetmover import \
craft_release_properties as beetmover_craft_release_properties
from taskgraph.util.attributes import copy_attributes_from_dependent_job
from taskgraph.util.schema import validate_schema, Schema, resolve_keyed_by, optionally_keyed_by
from taskgraph.util.scriptworker import (get_phase,
get_worker_type_for_scope)
from taskgraph.util.scriptworker import get_worker_type_for_scope
from taskgraph.transforms.task import task_description_schema
from voluptuous import Required, Optional
@ -104,7 +103,7 @@ def make_task_description(config, jobs):
'attributes': attributes,
'run-on-projects': ['mozilla-central'],
'treeherder': treeherder,
'shipping-phase': job.get('shipping-phase', get_phase(config)),
'shipping-phase': job['shipping-phase'],
}
yield task

Просмотреть файл

@ -32,5 +32,6 @@ def make_beetmover_description(config, jobs):
'dependent-task': dep_job,
'treeherder': treeherder,
'locale': locale,
'shipping-phase': job['shipping-phase'],
}
yield beet_description

Просмотреть файл

@ -16,7 +16,6 @@ from taskgraph.util.partials import (get_balrog_platform_name,
from taskgraph.util.schema import validate_schema, Schema
from taskgraph.util.scriptworker import (get_beetmover_bucket_scope,
get_beetmover_action_scope,
get_phase,
get_worker_type_for_scope)
from taskgraph.util.taskcluster import get_artifact_prefix
from taskgraph.transforms.task import task_description_schema
@ -171,7 +170,7 @@ beetmover_description_schema = Schema({
# locale is passed only for l10n beetmoving
Optional('locale'): basestring,
Optional('shipping-phase'): task_description_schema['shipping-phase'],
Required('shipping-phase'): task_description_schema['shipping-phase'],
Optional('shipping-product'): task_description_schema['shipping-product'],
})
@ -241,7 +240,6 @@ def make_task_description(config, jobs):
bucket_scope = get_beetmover_bucket_scope(config)
action_scope = get_beetmover_action_scope(config)
phase = get_phase(config)
task = {
'label': label,
@ -252,7 +250,7 @@ def make_task_description(config, jobs):
'attributes': attributes,
'run-on-projects': dep_job.attributes.get('run_on_projects'),
'treeherder': treeherder,
'shipping-phase': job.get('shipping-phase', phase),
'shipping-phase': job['shipping-phase'],
'shipping-product': job.get('shipping-product'),
}

Просмотреть файл

@ -11,7 +11,6 @@ from taskgraph.util.attributes import copy_attributes_from_dependent_job
from taskgraph.util.schema import validate_schema, Schema
from taskgraph.util.scriptworker import (get_beetmover_bucket_scope,
get_beetmover_action_scope,
get_phase,
get_worker_type_for_scope,
)
from taskgraph.util.taskcluster import get_artifact_prefix
@ -104,7 +103,6 @@ def make_task_description(config, jobs):
bucket_scope = get_beetmover_bucket_scope(config)
action_scope = get_beetmover_action_scope(config)
phase = get_phase(config)
task = {
'label': label,
@ -115,7 +113,7 @@ def make_task_description(config, jobs):
'attributes': attributes,
'run-on-projects': dep_job.attributes.get('run_on_projects'),
'treeherder': treeherder,
'shipping-phase': phase,
'shipping-phase': 'promote',
}
yield task

Просмотреть файл

@ -153,14 +153,6 @@ BEETMOVER_ACTION_SCOPES = {
}
"""Map the beetmover tasks aliases to phases.
"""
PHASES = {
'all-candidates-tasks': 'promote',
'all-push-tasks': 'push',
'default': None,
}
"""Known balrog actions."""
BALROG_ACTIONS = ('submit-locale', 'submit-toplevel', 'schedule')
@ -394,12 +386,6 @@ get_beetmover_action_scope = functools.partial(
alias_to_scope_map=BEETMOVER_ACTION_SCOPES,
)
get_phase = functools.partial(
get_phase_from_target_method,
alias_to_tasks_map=BEETMOVER_SCOPE_ALIAS_TO_TARGET_TASK,
alias_to_phase_map=PHASES,
)
get_balrog_server_scope = functools.partial(
get_scope_from_project,
alias_to_project_map=BALROG_SCOPE_ALIAS_TO_PROJECT,