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

Unified Diff: scripts/slave/recipe_modules/filter/api.py

Issue 1916303006: Fix GOMA_SERVICE_ACCOUNT_JSON_FILE propagation in mb. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: make sure GOMA_SERVICE_ACCOUNT_JSON_FILE is present in generate_build_files, too Created 4 years, 8 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
Index: scripts/slave/recipe_modules/filter/api.py
diff --git a/scripts/slave/recipe_modules/filter/api.py b/scripts/slave/recipe_modules/filter/api.py
index ea8de2e7d6de45174807e166774cef722fc1ff74..1178c9a9f70fb1cd64d99a14bd544ad06bb1a371 100644
--- a/scripts/slave/recipe_modules/filter/api.py
+++ b/scripts/slave/recipe_modules/filter/api.py
@@ -157,23 +157,24 @@ class FilterApi(recipe_api.RecipeApi):
'test_targets': [],
}
- kwargs.setdefault('env', {})
+ if use_mb:
+ # Ensure that mb runs in a clean environment to avoid
+ # picking up any GYP_DEFINES accidentally.
+ kwargs['env'] = {}
+ else:
+ kwargs.setdefault('env', {})
# If building for CrOS, execute through the "chrome_sdk" wrapper. This will
# override GYP environment variables, so we'll refrain from defining them
# to avoid confusing output.
if cros_board:
kwargs['wrapper'] = self.m.chromium.get_cros_chrome_sdk_wrapper()
- else:
+ elif not use_mb:
kwargs['env'].update(self.m.chromium.c.gyp_env.as_jsonish())
kwargs['env']['GOMA_SERVICE_ACCOUNT_JSON_FILE'] = \
self.m.goma.service_account_json_path
if use_mb:
- if 'env' in kwargs:
- # Ensure that mb runs in a clean environment to avoid
- # picking up any GYP_DEFINES accidentally.
- del kwargs['env']
mb_mastername = mb_mastername or self.m.properties['mastername']
mb_buildername = mb_buildername or self.m.properties['buildername']
step_result = self.m.python(

Powered by Google App Engine
This is Rietveld 408576698