Commit e8acd40a authored by Nodir Turakulov's avatar Nodir Turakulov Committed by Commit Bot

bot_update: pin depot_tools

gclient runhooks often calls scripts that depend on scripts in depot_tools.
Currently bot_update only ensures that depot_tools is present in $PATH, but
otherwise uses whatever depot_tools already specified in $PATH. We don't pin
depot_tools before running a recipe, so using whatever depot_tools in $PATH
is not hermetic.

Insert the path to the pinned depot_tools to the beginning of $PATH

R=iannucci@chromium.org

Bug:

Change-Id: I31d04ba2ec7c409f89d58a51502ce3565e3a02a1
Reviewed-on: https://chromium-review.googlesource.com/481072Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
parent 6f5a8d99
......@@ -36,7 +36,7 @@ class BotUpdateApi(recipe_api.RecipeApi):
env = self.m.step.get_from_context('env', {})
env.setdefault('PATH', '%(PATH)s')
env['PATH'] = self.m.path.pathsep.join([
env['PATH'], str(self._module.PACKAGE_REPO_ROOT)])
str(self._module.PACKAGE_REPO_ROOT), env['PATH']])
# These are to prevent git from hanging. If the git connection is slower
# than 1KB/s for more than 5 minutes then git will kill the connection
# and die with an error "error: RPC failed; curl 28 Operation too slow"
......
......@@ -20,7 +20,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -21,7 +21,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -74,7 +74,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -21,7 +21,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update - with branch heads",
......@@ -68,7 +68,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -20,7 +20,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -21,7 +21,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -68,7 +68,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -21,7 +21,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -68,7 +68,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -21,7 +21,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -68,7 +68,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -21,7 +21,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -68,7 +68,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -20,7 +20,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -67,7 +67,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -22,7 +22,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -69,7 +69,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -24,7 +24,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -71,7 +71,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -22,7 +22,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -69,7 +69,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -22,7 +22,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools];%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -69,7 +69,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools];%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -26,7 +26,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -75,7 +75,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -26,7 +26,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......
......@@ -26,7 +26,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -104,7 +104,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -26,7 +26,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -104,7 +104,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -26,7 +26,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -76,7 +76,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -26,7 +26,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -76,7 +76,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -28,7 +28,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -80,7 +80,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -28,7 +28,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -80,7 +80,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
......@@ -21,7 +21,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update",
......@@ -68,7 +68,7 @@
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "1000",
"GIT_HTTP_LOW_SPEED_TIME": "300",
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
},
"infra_step": true,
"name": "bot_update (without patch)",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment