From f2d9ecb08afdab2c547d4114fb6804ccffde00e5 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 12 Sep 2022 15:31:12 -0700 Subject: [PATCH] updated: run lfs prune (#25729) --- selfdrive/updated.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/selfdrive/updated.py b/selfdrive/updated.py index 7278ef5a80..403ea2172b 100755 --- a/selfdrive/updated.py +++ b/selfdrive/updated.py @@ -249,13 +249,14 @@ def finalize_update(wait_helper: WaitTimeHelper) -> None: run(["git", "reset", "--hard"], FINALIZED) run(["git", "submodule", "foreach", "--recursive", "git", "reset"], FINALIZED) - cloudlog.info("Starting git gc") + cloudlog.info("Starting git cleanup in finalized update") t = time.monotonic() try: run(["git", "gc"], FINALIZED) - cloudlog.event("Done git gc", duration=time.monotonic() - t) + run(["git", "lfs", "prune"], FINALIZED) + cloudlog.event("Done git cleanup", duration=time.monotonic() - t) except subprocess.CalledProcessError: - cloudlog.exception(f"Failed git gc, took {time.monotonic() - t:.3f} s") + cloudlog.exception(f"Failed git cleanup, took {time.monotonic() - t:.3f} s") if wait_helper.shutdown: cloudlog.info("got interrupted finalizing overlay")