Skip to content

Commit

Permalink
Bug 1572102 - deprioritize partner-repack tasks as they don't block Q…
Browse files Browse the repository at this point in the history
…E, r=aki

Lower the priority of partner-repack jobs and downstreams to medium, so that tasks which do block QE work are not impeded.

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

--HG--
extra : moz-landing-system : lando
  • Loading branch information
nthomas-mozilla committed Aug 27, 2019
1 parent 9b3cf34 commit e2bf0c8
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 3 deletions.
1 change: 1 addition & 0 deletions taskcluster/ci/release-partner-repack-beetmover/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
loader: taskgraph.loader.single_dep:loader

transforms:
- taskgraph.transforms.chunk_partners:transforms
- taskgraph.transforms.name_sanity:transforms
- taskgraph.transforms.beetmover_repackage_partner:transforms
- taskgraph.transforms.task:transforms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
loader: taskgraph.loader.single_dep:loader

transforms:
- taskgraph.transforms.chunk_partners:transforms
- taskgraph.transforms.name_sanity:transforms
- taskgraph.transforms.repackage_signing_partner:transforms
- taskgraph.transforms.task:transforms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
Optional('extra'): object,
Required('shipping-phase'): task_description_schema['shipping-phase'],
Optional('shipping-product'): task_description_schema['shipping-product'],
Optional('priority'): task_description_schema['priority'],
})

transforms = TransformSequence()
Expand Down Expand Up @@ -123,6 +124,10 @@ def make_task_description(config, jobs):
'repack_id': repack_id,
},
}
# we may have reduced the priority for partner jobs, otherwise task.py will set it
if job.get('priority'):
task['priority'] = job['priority']

yield task


Expand Down
7 changes: 6 additions & 1 deletion taskcluster/taskgraph/transforms/chunk_partners.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@

from mozbuild.chunkify import chunkify
from taskgraph.transforms.base import TransformSequence
from taskgraph.util.partners import get_partner_config_by_kind, locales_per_build_platform
from taskgraph.util.partners import (
get_partner_config_by_kind,
locales_per_build_platform,
apply_partner_priority,
)

transforms = TransformSequence()
transforms.add(apply_partner_priority)


used_repack_ids_by_platform = {}
Expand Down
1 change: 1 addition & 0 deletions taskcluster/taskgraph/transforms/job/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
Exclusive('optimization', 'optimization'): task_description_schema['optimization'],
Optional('needs-sccache'): task_description_schema['needs-sccache'],
Optional('release-artifacts'): task_description_schema['release-artifacts'],
Optional('priority'): task_description_schema['priority'],

# The "when" section contains descriptions of the circumstances under which
# this task should be included in the task graph. This will be converted
Expand Down
2 changes: 2 additions & 0 deletions taskcluster/taskgraph/transforms/partner_repack.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
from taskgraph.util.partners import (
check_if_partners_enabled,
get_partner_url_config,
apply_partner_priority,
)


transforms = TransformSequence()
transforms.add(apply_partner_priority)


@transforms.add
Expand Down
8 changes: 7 additions & 1 deletion taskcluster/taskgraph/transforms/repackage_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ def _by_platform(arg):
# if true, perform a checkout of a comm-central based branch inside the
# gecko checkout
Required('comm-checkout', default=False): bool,
}
},

# Override the default priority for the project
Optional('priority'): task_description_schema['priority'],
})

transforms = TransformSequence()
Expand Down Expand Up @@ -213,6 +216,9 @@ def make_job_description(config, jobs):
repack_stub_installer=repack_stub_installer),
}

# we may have reduced the priority for partner jobs, otherwise task.py will set it
if job.get('priority'):
task['priority'] = job['priority']
if build_platform.startswith('macosx'):
task.setdefault('fetches', {}).setdefault('toolchain', []).extend([
'linux64-libdmg',
Expand Down
4 changes: 4 additions & 0 deletions taskcluster/taskgraph/transforms/repackage_signing_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
Optional('extra'): object,
Optional('shipping-product'): task_description_schema['shipping-product'],
Optional('shipping-phase'): task_description_schema['shipping-phase'],
Optional('priority'): task_description_schema['priority'],
})

transforms.add(check_if_partners_enabled)
Expand Down Expand Up @@ -131,5 +132,8 @@ def make_repackage_signing_description(config, jobs):
'repack_id': repack_id,
}
}
# we may have reduced the priority for partner jobs, otherwise task.py will set it
if job.get('priority'):
task['priority'] = job['priority']

yield task
6 changes: 6 additions & 0 deletions taskcluster/taskgraph/transforms/signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@

# Max number of partner repacks per chunk
Optional('repacks-per-chunk'): int,

# Override the default priority for the project
Optional('priority'): task_description_schema['priority'],
})


Expand Down Expand Up @@ -196,6 +199,9 @@ def make_task_description(config, jobs):
task['treeherder'] = treeherder
if job.get('extra'):
task['extra'] = job['extra']
# we may have reduced the priority for partner jobs, otherwise task.py will set it
if job.get('priority'):
task['priority'] = job['priority']

yield task

Expand Down
5 changes: 4 additions & 1 deletion taskcluster/taskgraph/transforms/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ def _compute_geckoview_version(app_version, moz_build_date):
Optional('worker'): {
Required('implementation'): basestring,
Extra: object,
}
},

# Override the default priority for the project
Optional('priority'): basestring,
})

TC_TREEHERDER_SCHEMA_URL = 'https://github.com/taskcluster/taskcluster-treeherder/' \
Expand Down
17 changes: 17 additions & 0 deletions taskcluster/taskgraph/util/partners.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,3 +415,20 @@ def get_partners_to_be_published(config):
if sub_config.get("publish_to_releases"):
partners.append((partner, sub_config_name, sub_config['platforms']))
return partners


def apply_partner_priority(config, jobs):
priority = None
# Reduce the priority of the partner repack jobs because they don't block QE. Meanwhile
# leave EME-free jobs alone because they do, and they'll get the branch priority like the rest
# of the release. Only bother with this in production, not on staging releases on try.
# medium is the same as mozilla-central, see taskcluster/ci/config.yml. ie higher than
# integration branches because we don't want to wait a lot for the graph to be done, but
# for multiple releases the partner tasks always wait for non-partner.
if (config.kind.startswith('release-partner-repack') and
config.params.release_level() == "production"):
priority = 'medium'
for job in jobs:
if priority:
job['priority'] = priority
yield job

0 comments on commit e2bf0c8

Please sign in to comment.