зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1527313: [taskgraph] Don't use a workspace cache for hazard builds; r=glandium
These jobs only use the workspace for obj directories, have some some logic to cleanup the directory at the beginning of the run, so there is no reason to cache the directory. This also removes the now-unused common code for creating a workspace cache directory. Differential Revision: https://phabricator.services.mozilla.com/D62486 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
776a84e980
Коммит
f552683ada
|
@ -49,31 +49,6 @@ def add_cache(job, taskdesc, name, mount_point, skip_untrusted=False):
|
|||
pass
|
||||
|
||||
|
||||
def docker_worker_add_workspace_cache(config, job, taskdesc, extra=None):
|
||||
"""Add the workspace cache.
|
||||
|
||||
Args:
|
||||
config (TransformConfig): Transform configuration object.
|
||||
job (dict): Task's job description.
|
||||
taskdesc (dict): Target task description to modify.
|
||||
extra (str): Optional context passed in that supports extending the cache
|
||||
key name to avoid undesired conflicts with other caches.
|
||||
"""
|
||||
cache_name = '{}-build-{}-{}-workspace'.format(
|
||||
config.params['project'],
|
||||
taskdesc['attributes']['build_platform'],
|
||||
taskdesc['attributes']['build_type'],
|
||||
)
|
||||
if extra:
|
||||
cache_name = '{}-{}'.format(cache_name, extra)
|
||||
|
||||
mount_point = "{workdir}/workspace".format(**job['run'])
|
||||
|
||||
# Don't enable the workspace cache when we can't guarantee its
|
||||
# behavior, like on Try.
|
||||
add_cache(job, taskdesc, cache_name, mount_point, skip_untrusted=True)
|
||||
|
||||
|
||||
def add_artifacts(config, job, taskdesc, path):
|
||||
taskdesc['worker'].setdefault('artifacts', []).append({
|
||||
'name': get_artifact_prefix(taskdesc),
|
||||
|
|
|
@ -16,7 +16,6 @@ from taskgraph.transforms.job import (
|
|||
configure_taskdesc_for_run,
|
||||
)
|
||||
from taskgraph.transforms.job.common import (
|
||||
docker_worker_add_workspace_cache,
|
||||
setup_secrets,
|
||||
docker_worker_add_artifacts,
|
||||
add_tooltool,
|
||||
|
@ -51,7 +50,7 @@ def docker_worker_hazard(config, job, taskdesc):
|
|||
worker['artifacts'] = []
|
||||
|
||||
docker_worker_add_artifacts(config, job, taskdesc)
|
||||
docker_worker_add_workspace_cache(config, job, taskdesc)
|
||||
worker.setdefault('required-volumes', []).append('{workdir}/workspace'.format(**run))
|
||||
add_tooltool(config, job, taskdesc)
|
||||
setup_secrets(config, job, taskdesc)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче