Bug 1617481 - Remove nightly index's. r=aki

They only really worked for promoted builds when the build was generated on the nightly cron anyway.

Differential Revision: https://phabricator.services.mozilla.com/D74509
This commit is contained in:
Justin Wood
2020-05-18 14:41:17 +00:00
parent 03af1a7b7c
commit 4189cda85e

View File

@@ -141,9 +141,8 @@ task_description_schema = Schema({
'job-name': text_type,
# Type of gecko v2 index to use
'type': Any('generic', 'nightly', 'l10n', 'nightly-with-multi-l10n',
'nightly-l10n', 'shippable', 'shippable-l10n',
'android-nightly', 'android-nightly-with-multi-l10n',
'type': Any('generic', 'l10n',
'shippable', 'shippable-l10n',
'android-shippable', 'android-shippable-with-multi-l10n',
'shippable-with-multi-l10n'),
@@ -246,13 +245,6 @@ V2_TRUNK_ROUTE_TEMPLATES = [
"index.{trust-domain}.v2.trunk.revision.{branch_rev}.{product}.{job-name}",
]
V2_NIGHTLY_TEMPLATES = [
"index.{trust-domain}.v2.{project}.nightly.latest.{product}.{job-name}",
"index.{trust-domain}.v2.{project}.nightly.{build_date}.revision.{branch_rev}.{product}.{job-name}", # noqa - too long
"index.{trust-domain}.v2.{project}.nightly.{build_date}.latest.{product}.{job-name}",
"index.{trust-domain}.v2.{project}.nightly.revision.{branch_rev}.{product}.{job-name}",
]
V2_SHIPPABLE_TEMPLATES = [
"index.{trust-domain}.v2.{project}.shippable.latest.{product}.{job-name}",
"index.{trust-domain}.v2.{project}.shippable.{build_date}.revision.{branch_rev}.{product}.{job-name}", # noqa - too long
@@ -260,13 +252,6 @@ V2_SHIPPABLE_TEMPLATES = [
"index.{trust-domain}.v2.{project}.shippable.revision.{branch_rev}.{product}.{job-name}",
]
V2_NIGHTLY_L10N_TEMPLATES = [
"index.{trust-domain}.v2.{project}.nightly.latest.{product}-l10n.{job-name}.{locale}",
"index.{trust-domain}.v2.{project}.nightly.{build_date}.revision.{branch_rev}.{product}-l10n.{job-name}.{locale}", # noqa - too long
"index.{trust-domain}.v2.{project}.nightly.{build_date}.latest.{product}-l10n.{job-name}.{locale}", # noqa - too long
"index.{trust-domain}.v2.{project}.nightly.revision.{branch_rev}.{product}-l10n.{job-name}.{locale}", # noqa - too long
]
V2_SHIPPABLE_L10N_TEMPLATES = [
"index.{trust-domain}.v2.{project}.shippable.latest.{product}-l10n.{job-name}.{locale}",
"index.{trust-domain}.v2.{project}.shippable.{build_date}.revision.{branch_rev}.{product}-l10n.{job-name}.{locale}", # noqa - too long
@@ -1541,32 +1526,6 @@ def add_generic_index_routes(config, task):
return task
@index_builder('nightly')
def add_nightly_index_routes(config, task):
index = task.get('index')
routes = task.setdefault('routes', [])
verify_index(config, index)
subs = config.params.copy()
subs['job-name'] = index['job-name']
subs['build_date_long'] = time.strftime("%Y.%m.%d.%Y%m%d%H%M%S",
time.gmtime(config.params['build_date']))
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']
subs['branch_rev'] = get_branch_rev(config)
for tpl in V2_NIGHTLY_TEMPLATES:
routes.append(tpl.format(**subs))
# Also add routes for en-US
task = add_l10n_index_routes(config, task, force_locale="en-US")
return task
@index_builder('shippable')
def add_shippable_index_routes(config, task):
index = task.get('index')
@@ -1590,17 +1549,6 @@ def add_shippable_index_routes(config, task):
# Also add routes for en-US
task = add_shippable_l10n_index_routes(config, task, force_locale="en-US")
# For nightly-compat index:
if 'nightly' in config.params['target_tasks_method']:
add_nightly_index_routes(config, task)
return task
@index_builder('nightly-with-multi-l10n')
def add_nightly_multi_index_routes(config, task):
task = add_nightly_index_routes(config, task)
task = add_l10n_index_routes(config, task, force_locale="multi")
return task
@@ -1688,47 +1636,6 @@ def add_shippable_l10n_index_routes(config, task, force_locale=None):
for tpl in V2_SHIPPABLE_L10N_TEMPLATES:
routes.append(tpl.format(locale=locale, **subs))
# For nightly-compat index:
if 'nightly' in config.params['target_tasks_method']:
add_nightly_l10n_index_routes(config, task, force_locale)
return task
@index_builder('nightly-l10n')
def add_nightly_l10n_index_routes(config, task, force_locale=None):
index = task.get('index')
routes = task.setdefault('routes', [])
verify_index(config, index)
subs = config.params.copy()
subs['job-name'] = index['job-name']
subs['build_date_long'] = time.strftime("%Y.%m.%d.%Y%m%d%H%M%S",
time.gmtime(config.params['build_date']))
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']
subs['branch_rev'] = get_branch_rev(config)
locales = task['attributes'].get('chunk_locales',
task['attributes'].get('all_locales'))
# Some tasks has only one locale set
if task['attributes'].get('locale'):
locales = [task['attributes']['locale']]
if force_locale:
# Used for en-US and multi-locale
locales = [force_locale]
if not locales:
raise Exception("Error: Unable to use l10n index for tasks without locales")
for locale in locales:
for tpl in V2_NIGHTLY_L10N_TEMPLATES:
routes.append(tpl.format(locale=locale, **subs))
return task
@@ -1752,14 +1659,6 @@ def add_geckoview_index_routes(config, task):
return task
@index_builder('android-nightly')
def add_android_nightly_index_routes(config, task):
task = add_nightly_index_routes(config, task)
task = add_geckoview_index_routes(config, task)
return task
@index_builder('android-shippable')
def add_android_shippable_index_routes(config, task):
task = add_shippable_index_routes(config, task)
@@ -1768,14 +1667,6 @@ def add_android_shippable_index_routes(config, task):
return task
@index_builder('android-nightly-with-multi-l10n')
def add_android_nightly_multi_index_routes(config, task):
task = add_nightly_multi_index_routes(config, task)
task = add_geckoview_index_routes(config, task)
return task
@index_builder('android-shippable-with-multi-l10n')
def add_android_shippable_multi_index_routes(config, task):
task = add_shippable_multi_index_routes(config, task)