diff --git a/taskcluster/ci/release-source/kind.yml b/taskcluster/ci/release-source/kind.yml index edee9c4870fe..95421614b0dd 100644 --- a/taskcluster/ci/release-source/kind.yml +++ b/taskcluster/ci/release-source/kind.yml @@ -39,7 +39,7 @@ job-defaults: # The build_attrs transform defaults to setting a `skip-unlles-schedules' # optimization based on the task label. The tasks here don't have corresponding # schedules defined in mozbuild. - optimization: {} + optimization: null jobs: firefox-source/opt: diff --git a/taskcluster/taskgraph/transforms/balrog_submit.py b/taskcluster/taskgraph/transforms/balrog_submit.py index c69c4f34fdba..34b54b64da30 100644 --- a/taskcluster/taskgraph/transforms/balrog_submit.py +++ b/taskcluster/taskgraph/transforms/balrog_submit.py @@ -21,10 +21,6 @@ from taskgraph.transforms.task import task_description_schema from voluptuous import Optional -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - balrog_description_schema = schema.extend({ # unique label to describe this balrog task, defaults to balrog-{dep.label} Optional('label'): basestring, diff --git a/taskcluster/taskgraph/transforms/beetmover.py b/taskcluster/taskgraph/transforms/beetmover.py index 0a041dc8b54a..ad0b5812e793 100644 --- a/taskcluster/taskgraph/transforms/beetmover.py +++ b/taskcluster/taskgraph/transforms/beetmover.py @@ -114,10 +114,6 @@ UPSTREAM_SOURCE_ARTIFACTS = [ "source.tar.xz.asc", ] -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - transforms = TransformSequence() beetmover_description_schema = schema.extend({ diff --git a/taskcluster/taskgraph/transforms/beetmover_checksums.py b/taskcluster/taskgraph/transforms/beetmover_checksums.py index 686fbf37dc84..49239ce061fd 100644 --- a/taskcluster/taskgraph/transforms/beetmover_checksums.py +++ b/taskcluster/taskgraph/transforms/beetmover_checksums.py @@ -22,10 +22,6 @@ from voluptuous import Optional, Required from taskgraph.util.treeherder import replace_group from taskgraph.transforms.task import task_description_schema -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - beetmover_checksums_description_schema = schema.extend({ Required('depname', default='build'): basestring, Required('attributes'): {basestring: object}, diff --git a/taskcluster/taskgraph/transforms/beetmover_emefree_checksums.py b/taskcluster/taskgraph/transforms/beetmover_emefree_checksums.py index dd2aa2d760f4..e94a082b5d6f 100644 --- a/taskcluster/taskgraph/transforms/beetmover_emefree_checksums.py +++ b/taskcluster/taskgraph/transforms/beetmover_emefree_checksums.py @@ -14,10 +14,6 @@ from taskgraph.util.attributes import copy_attributes_from_dependent_job from taskgraph.transforms.task import task_description_schema from voluptuous import Required, Optional -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - beetmover_checksums_description_schema = schema.extend({ Required('depname', default='build'): basestring, Optional('label'): basestring, diff --git a/taskcluster/taskgraph/transforms/beetmover_geckoview.py b/taskcluster/taskgraph/transforms/beetmover_geckoview.py index 038958f8c43a..8bef23621874 100644 --- a/taskcluster/taskgraph/transforms/beetmover_geckoview.py +++ b/taskcluster/taskgraph/transforms/beetmover_geckoview.py @@ -37,8 +37,6 @@ _MOZ_UPDATE_CHANNEL_PER_BRANCH = { 'maple': '-nightly-maple', } -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - beetmover_description_schema = schema.extend({ Required('depname', default='build'): basestring, Optional('label'): basestring, diff --git a/taskcluster/taskgraph/transforms/beetmover_langpack_checksums.py b/taskcluster/taskgraph/transforms/beetmover_langpack_checksums.py index 1a550fa23e5e..2606bf8d6f28 100644 --- a/taskcluster/taskgraph/transforms/beetmover_langpack_checksums.py +++ b/taskcluster/taskgraph/transforms/beetmover_langpack_checksums.py @@ -17,10 +17,6 @@ from taskgraph.util.scriptworker import (get_beetmover_bucket_scope, from taskgraph.transforms.task import task_description_schema from voluptuous import Required, Optional -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - beetmover_checksums_description_schema = schema.extend({ Required('depname', default='build'): basestring, Optional('label'): basestring, diff --git a/taskcluster/taskgraph/transforms/beetmover_push_to_release.py b/taskcluster/taskgraph/transforms/beetmover_push_to_release.py index 07e242a0ffa0..185241cdeef7 100644 --- a/taskcluster/taskgraph/transforms/beetmover_push_to_release.py +++ b/taskcluster/taskgraph/transforms/beetmover_push_to_release.py @@ -16,15 +16,9 @@ from taskgraph.util.scriptworker import ( get_beetmover_bucket_scope, add_scope_prefix, get_worker_type_for_scope, ) -from taskgraph.transforms.job import job_description_schema from taskgraph.transforms.task import task_description_schema from voluptuous import Required, Optional -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} -job_description_schema = {str(k): v for k, v in job_description_schema.schema.iteritems()} - beetmover_push_to_release_description_schema = Schema({ Required('name'): basestring, diff --git a/taskcluster/taskgraph/transforms/beetmover_repackage.py b/taskcluster/taskgraph/transforms/beetmover_repackage.py index c4224e4941b3..2bfc9250e23d 100644 --- a/taskcluster/taskgraph/transforms/beetmover_repackage.py +++ b/taskcluster/taskgraph/transforms/beetmover_repackage.py @@ -136,10 +136,6 @@ UPSTREAM_ARTIFACT_SIGNED_MAR_PATHS = [ 'target.bz2.complete.mar', ] -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - beetmover_description_schema = schema.extend({ # depname is used in taskref's to identify the taskID of the unsigned things Required('depname', default='build'): basestring, diff --git a/taskcluster/taskgraph/transforms/beetmover_repackage_partner.py b/taskcluster/taskgraph/transforms/beetmover_repackage_partner.py index 6188afa39277..aaec48dfe2d7 100644 --- a/taskcluster/taskgraph/transforms/beetmover_repackage_partner.py +++ b/taskcluster/taskgraph/transforms/beetmover_repackage_partner.py @@ -35,10 +35,6 @@ import logging logger = logging.getLogger(__name__) -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - beetmover_description_schema = schema.extend({ # depname is used in taskref's to identify the taskID of the unsigned things Required('depname', default='build'): basestring, diff --git a/taskcluster/taskgraph/transforms/beetmover_source_checksums.py b/taskcluster/taskgraph/transforms/beetmover_source_checksums.py index fd6a208832fc..fc0f4ca722f9 100644 --- a/taskcluster/taskgraph/transforms/beetmover_source_checksums.py +++ b/taskcluster/taskgraph/transforms/beetmover_source_checksums.py @@ -20,10 +20,6 @@ from taskgraph.util.scriptworker import (generate_beetmover_artifact_map, from taskgraph.transforms.task import task_description_schema from voluptuous import Required, Optional -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - beetmover_checksums_description_schema = schema.extend({ Required('depname', default='build'): basestring, Optional('label'): basestring, diff --git a/taskcluster/taskgraph/transforms/checksums_signing.py b/taskcluster/taskgraph/transforms/checksums_signing.py index 33a674784160..bc7f09808d9a 100644 --- a/taskcluster/taskgraph/transforms/checksums_signing.py +++ b/taskcluster/taskgraph/transforms/checksums_signing.py @@ -19,10 +19,6 @@ from taskgraph.util.treeherder import replace_group from taskgraph.transforms.task import task_description_schema from voluptuous import Required, Optional -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - checksums_signing_description_schema = schema.extend({ Required('depname', default='beetmover'): basestring, Optional('label'): basestring, diff --git a/taskcluster/taskgraph/transforms/google_play_strings.py b/taskcluster/taskgraph/transforms/google_play_strings.py index 7d6d6593c71f..1704aae4f666 100644 --- a/taskcluster/taskgraph/transforms/google_play_strings.py +++ b/taskcluster/taskgraph/transforms/google_play_strings.py @@ -13,10 +13,6 @@ from taskgraph.util.schema import resolve_keyed_by, Schema from voluptuous import Required -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - google_play_description_schema = Schema({ Required('name'): basestring, Required('description'): task_description_schema['description'], diff --git a/taskcluster/taskgraph/transforms/job/__init__.py b/taskcluster/taskgraph/transforms/job/__init__.py index 56d920b2e60f..01a69741c717 100644 --- a/taskcluster/taskgraph/transforms/job/__init__.py +++ b/taskcluster/taskgraph/transforms/job/__init__.py @@ -33,10 +33,6 @@ from voluptuous import ( logger = logging.getLogger(__name__) -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - # Schema for a build description job_description_schema = Schema({ # The name of the job and the job's label. At least one must be specified, diff --git a/taskcluster/taskgraph/transforms/job/mozharness_test.py b/taskcluster/taskgraph/transforms/job/mozharness_test.py index 28279a02c192..a51d80aa3152 100644 --- a/taskcluster/taskgraph/transforms/job/mozharness_test.py +++ b/taskcluster/taskgraph/transforms/job/mozharness_test.py @@ -39,8 +39,6 @@ def get_variant(test_platform): return '' -test_description_schema = {str(k): v for k, v in test_description_schema.schema.iteritems()} - mozharness_test_run_schema = Schema({ Required('using'): 'mozharness-test', Required('test'): test_description_schema, diff --git a/taskcluster/taskgraph/transforms/l10n.py b/taskcluster/taskgraph/transforms/l10n.py index 0356eeaa5a93..dd5210939bc0 100644 --- a/taskcluster/taskgraph/transforms/l10n.py +++ b/taskcluster/taskgraph/transforms/l10n.py @@ -36,11 +36,6 @@ def _by_platform(arg): return optionally_keyed_by('build-platform', arg) -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -job_description_schema = {str(k): v for k, v in job_description_schema.schema.iteritems()} -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - l10n_description_schema = schema.extend({ # Name for this job, inferred from the dependent job before validation Required('name'): basestring, diff --git a/taskcluster/taskgraph/transforms/push_apk.py b/taskcluster/taskgraph/transforms/push_apk.py index 78d22486e1a6..b5e60d49abeb 100644 --- a/taskcluster/taskgraph/transforms/push_apk.py +++ b/taskcluster/taskgraph/transforms/push_apk.py @@ -17,10 +17,6 @@ from taskgraph.util.taskcluster import get_artifact_prefix from voluptuous import Optional, Required -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - push_apk_description_schema = Schema({ Required('dependent-tasks'): object, diff --git a/taskcluster/taskgraph/transforms/release_beetmover_signed_addons.py b/taskcluster/taskgraph/transforms/release_beetmover_signed_addons.py index ff29a20d37bd..5f14868dc5e6 100644 --- a/taskcluster/taskgraph/transforms/release_beetmover_signed_addons.py +++ b/taskcluster/taskgraph/transforms/release_beetmover_signed_addons.py @@ -24,9 +24,6 @@ import copy logger = logging.getLogger(__name__) -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - - transforms = TransformSequence() diff --git a/taskcluster/taskgraph/transforms/release_generate_checksums_beetmover.py b/taskcluster/taskgraph/transforms/release_generate_checksums_beetmover.py index 1efe12f9371a..f9d704210cdb 100644 --- a/taskcluster/taskgraph/transforms/release_generate_checksums_beetmover.py +++ b/taskcluster/taskgraph/transforms/release_generate_checksums_beetmover.py @@ -37,10 +37,6 @@ CHECKSUMS_SIGNING_ARTIFACTS = [ ] -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - release_generate_checksums_beetmover_schema = schema.extend({ # depname is used in taskref's to identify the taskID of the unsigned things Required('depname', default='build'): basestring, diff --git a/taskcluster/taskgraph/transforms/release_generate_checksums_signing.py b/taskcluster/taskgraph/transforms/release_generate_checksums_signing.py index a5200d1e6873..4a4d0d2dd34f 100644 --- a/taskcluster/taskgraph/transforms/release_generate_checksums_signing.py +++ b/taskcluster/taskgraph/transforms/release_generate_checksums_signing.py @@ -19,10 +19,6 @@ from taskgraph.util.taskcluster import get_artifact_path from taskgraph.transforms.task import task_description_schema from voluptuous import Required, Optional -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - release_generate_checksums_signing_schema = schema.extend({ Required('depname', default='release-generate-checksums'): basestring, Optional('label'): basestring, diff --git a/taskcluster/taskgraph/transforms/release_sign_and_push_langpacks.py b/taskcluster/taskgraph/transforms/release_sign_and_push_langpacks.py index 2f3b06f0bd9c..e466d97eb95e 100644 --- a/taskcluster/taskgraph/transforms/release_sign_and_push_langpacks.py +++ b/taskcluster/taskgraph/transforms/release_sign_and_push_langpacks.py @@ -14,8 +14,6 @@ from taskgraph.util.schema import resolve_keyed_by, optionally_keyed_by from taskgraph.transforms.task import task_description_schema from voluptuous import Any, Required -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - transforms = TransformSequence() langpack_sign_push_description_schema = schema.extend({ diff --git a/taskcluster/taskgraph/transforms/release_snap_push.py b/taskcluster/taskgraph/transforms/release_snap_push.py index c2f02eaedbdb..f2f00dd3cfe4 100644 --- a/taskcluster/taskgraph/transforms/release_snap_push.py +++ b/taskcluster/taskgraph/transforms/release_snap_push.py @@ -13,10 +13,6 @@ from taskgraph.util.schema import optionally_keyed_by, resolve_keyed_by, Schema from voluptuous import Optional, Required -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - push_snap_description_schema = Schema({ Required('name'): basestring, Required('job-from'): task_description_schema['job-from'], diff --git a/taskcluster/taskgraph/transforms/repackage.py b/taskcluster/taskgraph/transforms/repackage.py index f430fdb154a0..5c0f684ff8dc 100644 --- a/taskcluster/taskgraph/transforms/repackage.py +++ b/taskcluster/taskgraph/transforms/repackage.py @@ -22,10 +22,6 @@ from taskgraph.util.workertypes import worker_type_implementation from taskgraph.transforms.job import job_description_schema from voluptuous import Required, Optional -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -job_description_schema = {str(k): v for k, v in job_description_schema.schema.iteritems()} - packaging_description_schema = schema.extend({ # depname is used in taskref's to identify the taskID of the signed things diff --git a/taskcluster/taskgraph/transforms/repackage_partner.py b/taskcluster/taskgraph/transforms/repackage_partner.py index 2468acd90f5e..d379c7f8b7ac 100644 --- a/taskcluster/taskgraph/transforms/repackage_partner.py +++ b/taskcluster/taskgraph/transforms/repackage_partner.py @@ -24,10 +24,6 @@ from taskgraph.transforms.task import task_description_schema from taskgraph.transforms.repackage import PACKAGE_FORMATS from voluptuous import Required, Optional -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - def _by_platform(arg): return optionally_keyed_by('build-platform', arg) diff --git a/taskcluster/taskgraph/transforms/repackage_signing.py b/taskcluster/taskgraph/transforms/repackage_signing.py index 0b8b12d430df..5cf9a5bb8b67 100644 --- a/taskcluster/taskgraph/transforms/repackage_signing.py +++ b/taskcluster/taskgraph/transforms/repackage_signing.py @@ -20,10 +20,6 @@ from taskgraph.util.scriptworker import ( from taskgraph.transforms.task import task_description_schema from voluptuous import Required, Optional -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - repackage_signing_description_schema = schema.extend({ Required('depname', default='repackage'): basestring, Optional('label'): basestring, diff --git a/taskcluster/taskgraph/transforms/repackage_signing_partner.py b/taskcluster/taskgraph/transforms/repackage_signing_partner.py index 5889beb26590..b954808fd461 100644 --- a/taskcluster/taskgraph/transforms/repackage_signing_partner.py +++ b/taskcluster/taskgraph/transforms/repackage_signing_partner.py @@ -20,10 +20,6 @@ from taskgraph.util.taskcluster import get_artifact_path from taskgraph.transforms.task import task_description_schema from voluptuous import Required, Optional -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - transforms = TransformSequence() repackage_signing_description_schema = schema.extend({ diff --git a/taskcluster/taskgraph/transforms/signing.py b/taskcluster/taskgraph/transforms/signing.py index 442c5d7cebdc..0c19257659cd 100644 --- a/taskcluster/taskgraph/transforms/signing.py +++ b/taskcluster/taskgraph/transforms/signing.py @@ -20,10 +20,6 @@ from taskgraph.transforms.task import task_description_schema from voluptuous import Required, Optional -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - transforms = TransformSequence() signing_description_schema = schema.extend({ diff --git a/taskcluster/taskgraph/transforms/source_checksums_signing.py b/taskcluster/taskgraph/transforms/source_checksums_signing.py index 62cf935c91b4..2cc3e1ee36aa 100644 --- a/taskcluster/taskgraph/transforms/source_checksums_signing.py +++ b/taskcluster/taskgraph/transforms/source_checksums_signing.py @@ -18,10 +18,6 @@ from taskgraph.util.scriptworker import ( from taskgraph.transforms.task import task_description_schema from voluptuous import Required, Optional -# Voluptuous uses marker objects as dictionary *keys*, but they are not -# comparable, so we cast all of the keys back to regular strings -task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()} - checksums_signing_description_schema = schema.extend({ Required('depname', default='beetmover'): basestring, Optional('label'): basestring, diff --git a/taskcluster/taskgraph/transforms/source_test.py b/taskcluster/taskgraph/transforms/source_test.py index a4657191be27..fdd2cd845bbd 100644 --- a/taskcluster/taskgraph/transforms/source_test.py +++ b/taskcluster/taskgraph/transforms/source_test.py @@ -27,8 +27,6 @@ from voluptuous import ( Schema, ) -job_description_schema = {str(k): v for k, v in job_description_schema.schema.iteritems()} - source_test_description_schema = Schema({ # most fields are passed directly through as job fields, and are not # repeated here diff --git a/taskcluster/taskgraph/util/schema.py b/taskcluster/taskgraph/util/schema.py index 96f33fb609e2..1bdf1b571c41 100644 --- a/taskcluster/taskgraph/util/schema.py +++ b/taskcluster/taskgraph/util/schema.py @@ -215,6 +215,9 @@ class Schema(voluptuous.Schema): schema.__class__ = Schema return schema + def __getitem__(self, item): + return self.schema[item] + OptimizationSchema = voluptuous.Any( # always run this task (default)