api/sdk/clean: use --safe instead of only partials
In postsubmit we're accumulating cache artifacts until the builder runs
out of space. Per the build team we should be able to pass --safe and
we'll empty the location that's filling on the clean stage.
/b/s/w/ir/cache/cros_chroot/chroot/var/cache/chromeos-chrome/chrome-src-internal/src$
BUG=b:211000191
TEST=./run_tests
Change-Id: I03c957875d53fb15f081e6f9d2d1dd9805be9d47
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3346140
Auto-Submit: George Engelbrecht <engeg@google.com>
Reviewed-by: Alex Klein <saklein@chromium.org>
Tested-by: George Engelbrecht <engeg@google.com>
Commit-Queue: George Engelbrecht <engeg@google.com>
diff --git a/api/controller/sdk.py b/api/controller/sdk.py
index 37d3919..8a3d12b 100644
--- a/api/controller/sdk.py
+++ b/api/controller/sdk.py
@@ -119,7 +119,7 @@
def Clean(input_proto, _output_proto, _config):
"""Clean unneeded files from a chroot."""
chroot = controller_util.ParseChroot(input_proto.chroot)
- sdk.Clean(chroot, images=True, sysroots=True, tmp=True)
+ sdk.Clean(chroot, safe=True, sysroots=True)
@faux.all_empty