Bug 1391789 - Make tooltool cache level dependent; r=dustin

Caches shared across levels scare me, even if readers are purported to
perform content verification. We shouldn't take any risks with released
Firefox builds being contaminated by e.g. Try tasks.

Also, the old cache name interferes with my desire to make cache
names dynamic. This requires dynamic scopes. We already have
have level-{{level}}-* scopes for caches. So having all caches
prefixed with this makes things flexible.

MozReview-Commit-ID: LsrcxIYoEh1

--HG--
extra : rebase_source : dfe97f92a726059200ed79afe215ef2cf1fd7bf1
This commit is contained in:
Gregory Szorc 2017-08-18 16:15:44 -07:00
Родитель fc6c71dc35
Коммит f114aa8c35
2 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -43,8 +43,9 @@ Workspace Caches
Other Other
===== =====
``tooltool-cache`` ``level-{{level}}-tooltool-cache
Tooltool invocations should use this cache. Tooltool will store files here Tooltool invocations should use this cache. Tooltool will store files here
indexed by their hash, and will verify hashes before copying files from indexed by their hash.
this directory, so there is no concern with sharing the cache between jobs
of different levels. ``tooltool-cache`` (deprecated)
Legacy location for tooltool files. Use the per-level one instead.

Просмотреть файл

@ -142,9 +142,11 @@ def docker_worker_add_tooltool(config, job, taskdesc, internal=False):
assert job['worker']['implementation'] in ('docker-worker', 'docker-engine') assert job['worker']['implementation'] in ('docker-worker', 'docker-engine')
level = config.params['level']
taskdesc['worker'].setdefault('caches', []).append({ taskdesc['worker'].setdefault('caches', []).append({
'type': 'persistent', 'type': 'persistent',
'name': 'tooltool-cache', 'name': 'level-%s-tooltool-cache' % level,
'mount-point': '/home/worker/tooltool-cache', 'mount-point': '/home/worker/tooltool-cache',
}) })