Skip to content

Commit c9bdd35

Browse files
committed
fix(run-task): stop cleaning up fetches dir
This cleanup is problematic because it can fail if there are resources under the fetches dir that are still being used by subprocesses spawned by the task. The cleanup was added ~7 years ago to workaround fetches getting re-used on a generic-worker simple engine task. These days, everything should be using the multiuser engine which means tasks get entirely separate users and there's no possibility of accidentally re-using fetches between tasks. Also the Gecko `run-task` dropped this cleanup ~5 years ago.
1 parent 8ad39d9 commit c9bdd35

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

src/taskgraph/run-task/run-task

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,21 +1340,14 @@ def main(args):
13401340
b"%s is %s\n" % (k.encode("utf-8"), os.environ[k].encode("utf-8")),
13411341
)
13421342

1343-
try:
1344-
if "MOZ_FETCHES" in os.environ:
1345-
fetch_artifacts()
1343+
if "MOZ_FETCHES" in os.environ:
1344+
fetch_artifacts()
13461345

1347-
# Install Python requirements after fetches in case tasks want to use
1348-
# fetches to grab dependencies.
1349-
install_pip_requirements(repositories)
1346+
# Install Python requirements after fetches in case tasks want to use
1347+
# fetches to grab dependencies.
1348+
install_pip_requirements(repositories)
13501349

1351-
return run_command(b"task", task_args, cwd=args.task_cwd)
1352-
finally:
1353-
fetches_dir = os.environ.get("MOZ_FETCHES_DIR")
1354-
if fetches_dir and os.path.isdir(fetches_dir):
1355-
print_line(b"fetches", b"removing %s\n" % fetches_dir.encode("utf-8"))
1356-
remove(fetches_dir)
1357-
print_line(b"fetches", b"finished\n")
1350+
return run_command(b"task", task_args, cwd=args.task_cwd)
13581351

13591352

13601353
if __name__ == "__main__":

0 commit comments

Comments
 (0)