Skip to content

Commit

Permalink
Backed out 2 changesets (bug 1605275, bug 1605277) for build sign bus…
Browse files Browse the repository at this point in the history
…tage on a CLOSED TREE.

Backed out changeset af16e71c6922 (bug 1605277)
Backed out changeset 4534f3e46f6e (bug 1605275)
  • Loading branch information
raulgurzau committed Dec 24, 2019
1 parent be8bd71 commit f5133f8
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 21 deletions.
10 changes: 6 additions & 4 deletions taskcluster/ci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ scriptworker:
# See additional configuration in taskcluster/taskgraph/util/scriptworker.py
scope-prefix: 'project:releng'
worker-types:
'linux-signing':
- 'project:releng:signing:cert:release-signing'
- 'project:releng:signing:cert:nightly-signing'
'linux-depsigning':
- 'project:releng:signing:cert:dep-signing'
'scriptworker-k8s/gecko-3-beetmover':
- 'project:releng:beetmover:bucket:release'
- 'project:releng:beetmover:bucket:nightly'
Expand Down Expand Up @@ -336,10 +341,7 @@ workers:
provisioner: scriptworker-k8s
implementation: scriptworker-signing
os: linux
worker-type:
by-release-level:
production: gecko-3-signing
staging: gecko-t-signing
worker-type: gecko-3-signing
mac-depsigning:
provisioner: scriptworker-prov-v1
implementation: scriptworker-iscript
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/taskgraph/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
Required('provisioner'): optionally_keyed_by('level', text_type),
Required('implementation'): text_type,
Required('os'): text_type,
Required('worker-type'): optionally_keyed_by('level', 'release-level', text_type),
Required('worker-type'): optionally_keyed_by('level', text_type),
}
},
},
Expand Down
3 changes: 2 additions & 1 deletion taskcluster/taskgraph/transforms/geckodriver_signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from taskgraph.util.attributes import copy_attributes_from_dependent_job
from taskgraph.util.scriptworker import (
get_signing_cert_scope_per_platform,
get_worker_type_for_scope,
)
from taskgraph.transforms.task import task_description_schema
from voluptuous import Required, Optional
Expand Down Expand Up @@ -68,7 +69,7 @@ def make_repackage_signing_description(config, jobs):
task = {
'label': job['label'],
'description': description,
'worker-type': 'linux-signing',
'worker-type': get_worker_type_for_scope(config, signing_cert_scope),
'worker': {
'implementation': 'scriptworker-signing',
'upstream-artifacts': upstream_artifacts,
Expand Down
3 changes: 2 additions & 1 deletion taskcluster/taskgraph/transforms/mar_signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from taskgraph.util.attributes import copy_attributes_from_dependent_job, sorted_unique_list
from taskgraph.util.scriptworker import (
get_signing_cert_scope_per_platform,
get_worker_type_for_scope,
)
from taskgraph.util.partials import get_balrog_platform_name, get_partials_artifacts_from_params
from taskgraph.util.taskcluster import get_artifact_prefix
Expand Down Expand Up @@ -147,7 +148,7 @@ def make_task_description(config, jobs):
'label': label,
'description': "{} {}".format(
dep_job.task["metadata"]["description"], job['description-suffix']),
'worker-type': 'linux-signing',
'worker-type': get_worker_type_for_scope(config, signing_cert_scope),
'worker': {'implementation': 'scriptworker-signing',
'upstream-artifacts': upstream_artifacts,
'max-run-time': 3600},
Expand Down
3 changes: 2 additions & 1 deletion taskcluster/taskgraph/transforms/openh264_signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from taskgraph.util.attributes import copy_attributes_from_dependent_job
from taskgraph.util.scriptworker import (
get_signing_cert_scope_per_platform,
get_worker_type_for_scope,
)
from taskgraph.util.treeherder import inherit_treeherder_from_dep
from taskgraph.transforms.task import task_description_schema
Expand Down Expand Up @@ -81,7 +82,7 @@ def make_signing_description(config, jobs):
task = {
'label': job['label'],
'description': description,
'worker-type': 'linux-signing',
'worker-type': get_worker_type_for_scope(config, signing_cert_scope),
'worker': {'implementation': 'scriptworker-signing',
'upstream-artifacts': upstream_artifacts,
'max-run-time': 3600},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from taskgraph.util.attributes import copy_attributes_from_dependent_job
from taskgraph.util.scriptworker import (
get_signing_cert_scope,
get_worker_type_for_scope,
)
from taskgraph.util.taskcluster import get_artifact_path
from taskgraph.transforms.task import task_description_schema
Expand Down Expand Up @@ -67,7 +68,7 @@ def make_release_generate_checksums_signing_description(config, jobs):
task = {
'label': label,
'description': description,
'worker-type': 'linux-signing',
'worker-type': get_worker_type_for_scope(config, signing_cert_scope),
'worker': {'implementation': 'scriptworker-signing',
'upstream-artifacts': upstream_artifacts,
'max-run-time': 3600},
Expand Down
3 changes: 2 additions & 1 deletion taskcluster/taskgraph/transforms/repackage_signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from taskgraph.util.attributes import copy_attributes_from_dependent_job
from taskgraph.util.scriptworker import (
get_signing_cert_scope_per_platform,
get_worker_type_for_scope,
)
from taskgraph.transforms.task import task_description_schema
from voluptuous import Required, Optional
Expand Down Expand Up @@ -107,7 +108,7 @@ def make_repackage_signing_description(config, jobs):
task = {
'label': label,
'description': description,
'worker-type': 'linux-signing',
'worker-type': get_worker_type_for_scope(config, signing_cert_scope),
'worker': {'implementation': 'scriptworker-signing',
'upstream-artifacts': upstream_artifacts,
'max-run-time': 3600},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from taskgraph.util.partners import check_if_partners_enabled, get_partner_config_by_kind
from taskgraph.util.scriptworker import (
get_signing_cert_scope_per_platform,
get_worker_type_for_scope,
)
from taskgraph.util.taskcluster import get_artifact_path
from taskgraph.transforms.task import task_description_schema
Expand Down Expand Up @@ -119,7 +120,7 @@ def make_repackage_signing_description(config, jobs):
task = {
'label': label,
'description': description,
'worker-type': 'linux-signing',
'worker-type': get_worker_type_for_scope(config, signing_cert_scope),
'worker': {'implementation': 'scriptworker-signing',
'upstream-artifacts': upstream_artifacts,
'max-run-time': 3600},
Expand Down
3 changes: 2 additions & 1 deletion taskcluster/taskgraph/transforms/signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from taskgraph.util.schema import taskref_or_string
from taskgraph.util.scriptworker import (
get_signing_cert_scope_per_platform,
get_worker_type_for_scope,
)
from taskgraph.transforms.task import task_description_schema
from voluptuous import Required, Optional
Expand Down Expand Up @@ -156,7 +157,7 @@ def make_task_description(config, jobs):
signing_cert_scope = get_signing_cert_scope_per_platform(
build_platform, is_nightly, config
)
worker_type_alias = 'linux-signing' if is_nightly else 'linux-depsigning'
worker_type_alias = get_worker_type_for_scope(config, signing_cert_scope)
mac_behavior = None
task = {
'label': label,
Expand Down
4 changes: 3 additions & 1 deletion taskcluster/taskgraph/transforms/source_checksums_signing.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""
Expand All @@ -11,6 +12,7 @@
from taskgraph.util.attributes import copy_attributes_from_dependent_job
from taskgraph.util.scriptworker import (
get_signing_cert_scope,
get_worker_type_for_scope,
)
from taskgraph.transforms.task import task_description_schema
from voluptuous import Required, Optional
Expand Down Expand Up @@ -62,7 +64,7 @@ def make_checksums_signing_description(config, jobs):
task = {
'label': label,
'description': description,
'worker-type': 'linux-signing',
'worker-type': get_worker_type_for_scope(config, signing_cert_scope),
'worker': {'implementation': 'scriptworker-signing',
'upstream-artifacts': upstream_artifacts,
'max-run-time': 3600},
Expand Down
3 changes: 1 addition & 2 deletions taskcluster/taskgraph/transforms/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -1824,8 +1824,7 @@ def build_task(config, tasks):
provisioner_id, worker_type = get_worker_type(
config.graph_config,
task['worker-type'],
level=level,
release_level=config.params.release_level(),
level,
)
task['worker-type'] = '/'.join([provisioner_id, worker_type])
project = config.params['project']
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/taskgraph/util/scriptworker.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def get_release_config(config):
def get_signing_cert_scope_per_platform(build_platform, is_nightly, config):
if 'devedition' in build_platform:
return get_devedition_signing_cert_scope(config)
elif is_nightly:
elif is_nightly or build_platform in ('firefox-source', 'fennec-source', 'thunderbird-source'):
return get_signing_cert_scope(config)
else:
return add_scope_prefix(config, 'signing:cert:dep-signing')
Expand Down
13 changes: 8 additions & 5 deletions taskcluster/taskgraph/util/workertypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


@memoize
def _get(graph_config, alias, level, release_level):
def _get(graph_config, alias, level):
"""Get the configuration for this worker_type alias: {provisioner,
worker-type, implementation, os}"""
level = str(level)
Expand Down Expand Up @@ -69,23 +69,26 @@ def _get(graph_config, alias, level, release_level):
worker_config['worker-type'] = evaluate_keyed_by(
worker_config['worker-type'],
"worker-type alias {} field worker-type".format(alias),
{"level": level, 'release-level': release_level}).format(level=level, alias=alias)
{"level": level}).format(level=level, alias=alias)

return worker_config


@memoize
def worker_type_implementation(graph_config, worker_type):
"""Get the worker implementation and OS for the given workerType, where the
OS represents the host system, not the target OS, in the case of
cross-compiles."""
worker_config = _get(graph_config, worker_type, '1', 'staging')
worker_config = _get(graph_config, worker_type, '1')
return worker_config['implementation'], worker_config.get('os')


def get_worker_type(graph_config, worker_type, level, release_level):
@memoize
def get_worker_type(graph_config, worker_type, level):
"""
Get the worker type provisioner and worker-type, optionally evaluating
aliases from the graph config.
"""
worker_config = _get(graph_config, worker_type, level, release_level)
worker_config = _get(graph_config, worker_type, level)

return worker_config['provisioner'], worker_config['worker-type']

0 comments on commit f5133f8

Please sign in to comment.