Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: client/run_isolated.py

Issue 2973113003: [run_isolated] Tolerate cache uninstall errors. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/run_isolated.py
diff --git a/client/run_isolated.py b/client/run_isolated.py
index 8bbb6d233380d96d1fe035ca500b7e65c96fa877..3e035688f48eec2d5adcfe7b89bd9687f89e8355 100755
--- a/client/run_isolated.py
+++ b/client/run_isolated.py
@@ -1053,9 +1053,19 @@ def main(args):
try:
yield
finally:
+ # Uninstall each named cache, returning it to the cache pool. If an
+ # uninstall fails for a given cache, it will remain in the task's
+ # temporary space, get cleaned up by the Swarming bot, and be lost.
+ #
+ # If the Swarming bot cannot clean up the cache, it will handle it like
+ # any other bot file that could not be removed.
with named_cache_manager.open():
for path, name in caches:
- named_cache_manager.uninstall(path, name)
+ try:
+ named_cache_manager.uninstall(path, name)
Vadim Sh. 2017/07/07 18:01:46 does this thing leave 'named_cache_manager' in con
dnj 2017/07/07 18:14:12 Good question. It seems to: https://cs.chromium.or
+ except named_cache.Error:
+ logging.exception('Error while removing named cache %r at %r. '
+ 'The cache will be lost.', path, name)
try:
if options.isolate_server:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698