From 69c261272ee25f4a03942a75787dc920030ab5e5 Mon Sep 17 00:00:00 2001 From: Tom Prince Date: Mon, 4 Dec 2017 15:47:37 -0700 Subject: [PATCH] Bug 1424150: Use `trust-domain` to key `gecko.v2` routes so that comm-central can use a different route hierarchy; r=dustin MozReview-Commit-ID: F580STCDwXg --HG-- extra : rebase_source : b3238e2415bb18b7aad43cfddb0655528f373a12 --- taskcluster/taskgraph/transforms/task.py | 38 ++++++++++++++---------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/taskcluster/taskgraph/transforms/task.py b/taskcluster/taskgraph/transforms/task.py index 24bf08f491f1..b8c3be95e301 100755 --- a/taskcluster/taskgraph/transforms/task.py +++ b/taskcluster/taskgraph/transforms/task.py @@ -565,36 +565,36 @@ TC_TREEHERDER_SCHEMA_URL = 'https://github.com/taskcluster/taskcluster-treeherde UNKNOWN_GROUP_NAME = "Treeherder group {} has no name; add it to " + __file__ V2_ROUTE_TEMPLATES = [ - "index.gecko.v2.{project}.latest.{product}.{job-name}", - "index.gecko.v2.{project}.pushdate.{build_date_long}.{product}.{job-name}", - "index.gecko.v2.{project}.pushlog-id.{pushlog_id}.{product}.{job-name}", - "index.gecko.v2.{project}.revision.{head_rev}.{product}.{job-name}", + "index.{trust-domain}.v2.{project}.latest.{product}.{job-name}", + "index.{trust-domain}.v2.{project}.pushdate.{build_date_long}.{product}.{job-name}", + "index.{trust-domain}.v2.{project}.pushlog-id.{pushlog_id}.{product}.{job-name}", + "index.{trust-domain}.v2.{project}.revision.{head_rev}.{product}.{job-name}", ] # {central, inbound, autoland} write to a "trunk" index prefix. This facilitates # walking of tasks with similar configurations. V2_TRUNK_ROUTE_TEMPLATES = [ - "index.gecko.v2.trunk.revision.{head_rev}.{product}.{job-name}", + "index.{trust-domain}.v2.trunk.revision.{head_rev}.{product}.{job-name}", ] V2_NIGHTLY_TEMPLATES = [ - "index.gecko.v2.{project}.nightly.latest.{product}.{job-name}", - "index.gecko.v2.{project}.nightly.{build_date}.revision.{head_rev}.{product}.{job-name}", - "index.gecko.v2.{project}.nightly.{build_date}.latest.{product}.{job-name}", - "index.gecko.v2.{project}.nightly.revision.{head_rev}.{product}.{job-name}", + "index.{trust-domain}.v2.{project}.nightly.latest.{product}.{job-name}", + "index.{trust-domain}.v2.{project}.nightly.{build_date}.revision.{head_rev}.{product}.{job-name}", + "index.{trust-domain}.v2.{project}.nightly.{build_date}.latest.{product}.{job-name}", + "index.{trust-domain}.v2.{project}.nightly.revision.{head_rev}.{product}.{job-name}", ] V2_NIGHTLY_L10N_TEMPLATES = [ - "index.gecko.v2.{project}.nightly.latest.{product}-l10n.{job-name}.{locale}", - "index.gecko.v2.{project}.nightly.{build_date}.revision.{head_rev}.{product}-l10n.{job-name}.{locale}", # noqa - too long - "index.gecko.v2.{project}.nightly.{build_date}.latest.{product}-l10n.{job-name}.{locale}", - "index.gecko.v2.{project}.nightly.revision.{head_rev}.{product}-l10n.{job-name}.{locale}", + "index.{trust-domain}.v2.{project}.nightly.latest.{product}-l10n.{job-name}.{locale}", + "index.{trust-domain}.v2.{project}.nightly.{build_date}.revision.{head_rev}.{product}-l10n.{job-name}.{locale}", # noqa - too long + "index.{trust-domain}.v2.{project}.nightly.{build_date}.latest.{product}-l10n.{job-name}.{locale}", + "index.{trust-domain}.v2.{project}.nightly.revision.{head_rev}.{product}-l10n.{job-name}.{locale}", ] V2_L10N_TEMPLATES = [ - "index.gecko.v2.{project}.revision.{head_rev}.{product}-l10n.{job-name}.{locale}", - "index.gecko.v2.{project}.pushdate.{build_date_long}.{product}-l10n.{job-name}.{locale}", - "index.gecko.v2.{project}.latest.{product}-l10n.{job-name}.{locale}", + "index.{trust-domain}.v2.{project}.revision.{head_rev}.{product}-l10n.{job-name}.{locale}", + "index.{trust-domain}.v2.{project}.pushdate.{build_date_long}.{product}-l10n.{job-name}.{locale}", + "index.{trust-domain}.v2.{project}.latest.{product}-l10n.{job-name}.{locale}", ] # the roots of the treeherder routes, keyed by treeherder environment @@ -1090,6 +1090,7 @@ def add_generic_index_routes(config, task): subs['build_date_long'] = time.strftime("%Y.%m.%d.%Y%m%d%H%M%S", time.gmtime(config.params['build_date'])) subs['product'] = index['product'] + subs['trust-domain'] = config.graph_config['trust-domain'] project = config.params.get('project') @@ -1119,6 +1120,7 @@ def add_nightly_index_routes(config, task): subs['build_date'] = time.strftime("%Y.%m.%d", time.gmtime(config.params['build_date'])) subs['product'] = index['product'] + subs['trust-domain'] = config.graph_config['trust-domain'] for tpl in V2_NIGHTLY_TEMPLATES: routes.append(tpl.format(**subs)) @@ -1142,6 +1144,7 @@ def add_release_index_routes(config, task): subs['revision'] = subs['head_rev'] subs['underscore_version'] = release_config['version'].replace('.', '_') subs['product'] = index['product'] + subs['trust-domain'] = config.graph_config['trust-domain'] subs['branch'] = subs['project'] if 'channel' in index: resolve_keyed_by( @@ -1176,6 +1179,7 @@ def add_l10n_index_routes(config, task, force_locale=None): subs['build_date_long'] = time.strftime("%Y.%m.%d.%Y%m%d%H%M%S", time.gmtime(config.params['build_date'])) subs['product'] = index['product'] + subs['trust-domain'] = config.graph_config['trust-domain'] locales = task['attributes'].get('chunk_locales', task['attributes'].get('all_locales')) @@ -1214,6 +1218,7 @@ def add_nightly_l10n_index_routes(config, task, force_locale=None): subs['build_date_long'] = time.strftime("%Y.%m.%d.%Y%m%d%H%M%S", time.gmtime(config.params['build_date'])) subs['product'] = index['product'] + subs['trust-domain'] = config.graph_config['trust-domain'] locales = task['attributes'].get('chunk_locales', task['attributes'].get('all_locales')) @@ -1576,6 +1581,7 @@ def check_v2_routes(): # we use different variables than mozharness for mh, tg in [ ('{index}', 'index'), + ('gecko', '{trust-domain}'), ('{build_product}', '{product}'), ('{build_name}-{build_type}', '{job-name}'), ('{year}.{month}.{day}.{pushdate}', '{build_date_long}'),