Bug 1551739: [taskcluster] Use inherit_from_treeherder in langpack tasks; r=Callek

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tom Prince 2019-05-15 17:54:13 +00:00
parent c11673ccf7
commit cb6a48a553
3 changed files with 6 additions and 20 deletions

View File

@ -17,6 +17,7 @@ from taskgraph.util.scriptworker import (generate_beetmover_artifact_map,
get_beetmover_bucket_scope,
get_worker_type_for_scope,
should_use_artifact_map)
from taskgraph.util.treeherder import inherit_treeherder_from_dep
from taskgraph.transforms.task import task_description_schema
from voluptuous import Required, Optional
@ -40,17 +41,11 @@ def make_beetmover_checksums_description(config, jobs):
dep_job = job['primary-dependency']
attributes = dep_job.attributes
treeherder = job.get('treeherder', {})
treeherder = inherit_treeherder_from_dep(job, dep_job)
treeherder.setdefault(
'symbol',
'BMcslang(N{})'.format(attributes.get('l10n_chunk', ''))
)
dep_th_platform = dep_job.task.get('extra', {}).get(
'treeherder', {}).get('machine', {}).get('platform', '')
treeherder.setdefault('platform',
"{}/opt".format(dep_th_platform))
treeherder.setdefault('tier', 1)
treeherder.setdefault('kind', 'build')
label = job['label']
build_platform = attributes.get('build_platform')

View File

@ -17,6 +17,7 @@ from taskgraph.util.scriptworker import (get_beetmover_bucket_scope,
generate_beetmover_upstream_artifacts,
generate_beetmover_artifact_map,
should_use_artifact_map)
from taskgraph.util.treeherder import inherit_treeherder_from_dep
from taskgraph.transforms.task import task_description_schema
from taskgraph.transforms.release_sign_and_push_langpacks import get_upstream_task_ref
from voluptuous import Required, Optional
@ -89,14 +90,8 @@ def make_task_description(config, jobs):
dep_job = job['primary-dependency']
attributes = dep_job.attributes
treeherder = job.get('treeherder', {})
treeherder = inherit_treeherder_from_dep(job, dep_job)
treeherder.setdefault('symbol', 'langpack(BM{})'.format(attributes.get('l10n_chunk', '')))
dep_th_platform = dep_job.task.get('extra', {}).get(
'treeherder', {}).get('machine', {}).get('platform', '')
treeherder.setdefault('platform',
"{}/opt".format(dep_th_platform))
treeherder.setdefault('tier', 1)
treeherder.setdefault('kind', 'build')
job['attributes'].update(copy_attributes_from_dependent_job(dep_job))
job['attributes']['chunk_locales'] = dep_job.attributes['chunk_locales']

View File

@ -11,6 +11,7 @@ from taskgraph.loader.single_dep import schema
from taskgraph.transforms.base import TransformSequence
from taskgraph.util.attributes import copy_attributes_from_dependent_job
from taskgraph.util.schema import resolve_keyed_by, optionally_keyed_by
from taskgraph.util.treeherder import inherit_treeherder_from_dep
from taskgraph.transforms.task import task_description_schema
from voluptuous import Any, Required
@ -103,15 +104,10 @@ def make_task_description(config, jobs):
for job in jobs:
dep_job = job['primary-dependency']
treeherder = job.get('treeherder', {})
treeherder = inherit_treeherder_from_dep(job, dep_job)
treeherder.setdefault('symbol', 'langpack(SnP{})'.format(
job['attributes'].get('l10n_chunk', '')
))
dep_th_platform = dep_job.task.get('extra', {}).get(
'treeherder', {}).get('machine', {}).get('platform', '')
treeherder.setdefault('platform', '{}/opt'.format(dep_th_platform))
treeherder.setdefault('tier', 1)
treeherder.setdefault('kind', 'build')
job['description'] = job['description'].format(
locales='/'.join(job['attributes']['chunk_locales']),