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

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

Issue 2969463002: Use config.json to enable Isolated gRPC proxy (Closed)
Patch Set: Fix pylint errors 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') | no next file with comments »
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..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.
« no previous file with comments | « no previous file | client/isolate_storage.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698