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

Unified Diff: appengine/swarming/swarming_bot/bot_code/bot_main.py

Issue 2969463002: Use config.json to enable Isolated gRPC proxy (Closed)
Patch Set: Created 3 years, 6 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 | client/isolate_storage.py » ('j') | client/isolateserver.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c46df352c7a55a8030bd657da9c44d567af8f335 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')
Vadim Sh. 2017/06/29 19:00:18 use underscores, so it is a valid proto field name
aludwin 2017/06/29 19:14:30 Done.
+ 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.
« no previous file with comments | « no previous file | client/isolate_storage.py » ('j') | client/isolateserver.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698