mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 03:35:33 +00:00
Bug 1415619: Add some routes that humans can use to cached tasks. r=dustin,mshal
MozReview-Commit-ID: BmiJ8WBl6yq --HG-- extra : rebase_source : 0846bc24eb1ed188d258fc8e3877f413122349ff
This commit is contained in:
parent
74ceb1d825
commit
cf221c670c
@ -24,7 +24,7 @@ from taskgraph import GECKO
|
||||
from taskgraph.util.cached_tasks import add_optimization
|
||||
|
||||
|
||||
CACHE_TYPE = 'toolchains.v1'
|
||||
CACHE_TYPE = 'toolchains.v2'
|
||||
|
||||
toolchain_run_schema = Schema({
|
||||
Required('using'): 'toolchain-script',
|
||||
|
@ -5,11 +5,16 @@
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import hashlib
|
||||
import time
|
||||
|
||||
|
||||
TARGET_CACHE_INDEX = (
|
||||
'gecko.cache.level-{level}.{type}.{name}.{digest}'
|
||||
'gecko.cache.level-{level}.{type}.{name}.hash.{digest}'
|
||||
)
|
||||
EXTRA_CACHE_INDEXES = [
|
||||
'gecko.cache.level-{level}.{type}.{name}.latest',
|
||||
'gecko.cache.level-{level}.{type}.{name}.pushdate.{build_date_long}',
|
||||
]
|
||||
|
||||
|
||||
def add_optimization(config, taskdesc, cache_type, cache_name, digest=None, digest_data=None):
|
||||
@ -53,3 +58,11 @@ def add_optimization(config, taskdesc, cache_type, cache_name, digest=None, dige
|
||||
# ... and cache at the lowest level.
|
||||
taskdesc.setdefault('routes', []).append(
|
||||
'index.{}'.format(TARGET_CACHE_INDEX.format(**subs)))
|
||||
|
||||
# ... and add some extra routes for humans
|
||||
subs['build_date_long'] = time.strftime("%Y.%m.%d.%Y%m%d%H%M%S",
|
||||
time.gmtime(config.params['build_date']))
|
||||
taskdesc['routes'].extend([
|
||||
'index.{}'.format(route.format(**subs))
|
||||
for route in EXTRA_CACHE_INDEXES
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user