Index: appengine/swarming/swarming_bot/bot_code/bot_main.py |
diff --git a/appengine/swarming/swarming_bot/bot_code/bot_main.py b/appengine/swarming/swarming_bot/bot_code/bot_main.py |
index 25157f16dc564af18f63822fa12bd530ae16d31e..c24ebc01e65e006351aab43744b08a3ee3bffba6 100644 |
--- a/appengine/swarming/swarming_bot/bot_code/bot_main.py |
+++ b/appengine/swarming/swarming_bot/bot_code/bot_main.py |
@@ -575,7 +575,7 @@ def _run_isolated_flags(botobj): |
min_free = ( |
_min_free_disk({'size_mb': size}, partition) + |
partition['wiggle']) |
- return [ |
+ args = [ |
'--cache', os.path.join(botobj.base_dir, 'isolated_cache'), |
'--min-free-space', str(min_free), |
'--named-cache-root', os.path.join(botobj.base_dir, 'c'), |
@@ -583,6 +583,15 @@ def _run_isolated_flags(botobj): |
'--max-items', str(settings['caches']['isolated']['items']), |
] |
+ # Get the gRPC proxy from the config, but allow an environment variable to |
+ # override. |
+ grpc_proxy = get_config().get('isolate_grpc_proxy') |
+ grpc_proxy = os.environ.get('ISOLATE_GRPC_PROXY', grpc_proxy) |
+ if grpc_proxy is not None: |
+ logging.info('Isolate will use gRPC proxy %s', grpc_proxy) |
+ args.extend(['--grpc-proxy', grpc_proxy]) |
+ return args |
+ |
def _clean_cache(botobj): |
"""Asks run_isolated to clean its cache. |