Skip to content

Commit

Permalink
refactor!: remove 'cache-dotcache' key
Browse files Browse the repository at this point in the history
  • Loading branch information
ahal committed Jan 20, 2025
1 parent e2e8e12 commit 0efe39a
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/taskgraph/transforms/run/run_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
run_task_schema = Schema(
{
Required("using"): "run-task",
# if true, add a cache at ~worker/.cache, which is where things like pip
# tend to hide their caches. This cache is never added for level-1 tasks.
# TODO Once bug 1526028 is fixed, this and 'use-caches' should be merged.
Required("cache-dotcache"): bool,
# Which caches to use. May take a boolean in which case either all
# (True) or no (False) caches will be used. Alternatively, it can
# accept a list of caches to enable. Defaults to only the checkout cache
Expand Down Expand Up @@ -115,7 +111,6 @@ def common_setup(config, task, taskdesc, command):


worker_defaults = {
"cache-dotcache": False,
"checkout": True,
"sparse-profile": None,
"run-as-root": False,
Expand All @@ -142,16 +137,6 @@ def docker_worker_run_task(config, task, taskdesc):
command = run.pop("run-task-command", ["/usr/local/bin/run-task"])
common_setup(config, task, taskdesc, command)

if run.get("cache-dotcache"):
worker["caches"].append(
{
"type": "persistent",
"name": "{project}-dotcache".format(**config.params),
"mount-point": "{workdir}/.cache".format(**run),
"skip-untrusted": True,
}
)

run_command = run["command"]

# dict is for the case of `{'task-reference': str}`.
Expand Down Expand Up @@ -184,13 +169,6 @@ def generic_worker_run_task(config, task, taskdesc):
common_setup(config, task, taskdesc, command)

worker.setdefault("mounts", [])
if run.get("cache-dotcache"):
worker["mounts"].append(
{
"cache-name": "{project}-dotcache".format(**config.params),
"directory": "{workdir}/.cache".format(**run),
}
)
worker["mounts"].append(
{
"content": {
Expand Down

0 comments on commit 0efe39a

Please sign in to comment.