diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md
index ca3654889..f1130ee6c 100644
--- a/recipes/README.recipes.md
+++ b/recipes/README.recipes.md
@@ -58,12 +58,12 @@ Recipe module to ensure a checkout is consistent on a bot.
Wrapper for easy calling of bot_update.
-— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#529)(self, bot_update_step):**
+— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#531)(self, bot_update_step):**
Deapplies a patch, taking care of DEPS and solution revisions properly.
-— **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#77)(self, gclient_config=None, suffix=None, patch=True, update_presentation=True, patch_root=None, with_branch_heads=False, with_tags=False, no_fetch_tags=False, refs=None, patch_oauth2=None, oauth2_json=None, use_site_config_creds=None, clobber=False, root_solution_revision=None, rietveld=None, issue=None, patchset=None, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, assert_one_gerrit_change=True, disable_syntax_validation=False, patch_refs=None, ignore_input_commit=False, add_blamelists=False, set_output_commit=False, step_test_data=None, enforce_fetch=False, \*\*kwargs):**
+— **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#79)(self, gclient_config=None, suffix=None, patch=True, update_presentation=True, patch_root=None, with_branch_heads=False, with_tags=False, no_fetch_tags=False, refs=None, patch_oauth2=None, oauth2_json=None, use_site_config_creds=None, clobber=False, root_solution_revision=None, rietveld=None, issue=None, patchset=None, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, assert_one_gerrit_change=True, disable_syntax_validation=False, patch_refs=None, ignore_input_commit=False, add_blamelists=False, set_output_commit=False, step_test_data=None, enforce_fetch=False, \*\*kwargs):**
Args:
* gclient_config: The gclient configuration to use when running bot_update.
@@ -95,7 +95,7 @@ Args:
bot_update module ONLY supports one change. Users may specify a change
via tryserver.set_change() and explicitly set this flag False.
-— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#506)(self, project_name, gclient_config=None):**
+— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#508)(self, project_name, gclient_config=None):**
Returns all property names used for storing the checked-out revision of
a given project.
@@ -109,9 +109,9 @@ Args:
Returns (list of str): All properties that'll hold the checked-out revision
of the given project. An empty list if no such properties exist.
- **@property**
— **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#45)(self):**
+ **@property**
— **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#47)(self):**
-— **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#457)(self, bot_update_json, name):**
+— **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#459)(self, bot_update_json, name):**
Sets a fixed revision for a single dependency using project revision
properties.
diff --git a/recipes/recipe_modules/bot_update/api.py b/recipes/recipe_modules/bot_update/api.py
index e212b0c38..db8d84f68 100644
--- a/recipes/recipe_modules/bot_update/api.py
+++ b/recipes/recipe_modules/bot_update/api.py
@@ -32,7 +32,9 @@ class BotUpdateApi(recipe_api.RecipeApi):
'GIT_HTTP_LOW_SPEED_LIMIT': '102400', # in bytes
'GIT_HTTP_LOW_SPEED_TIME': 1800, # in seconds
}
- if self.m.buildbucket.build.id != 0:
+ if self.m.buildbucket.build.id == 0:
+ env['DEPOT_TOOLS_COLLECT_METRICS'] = '0'
+ else:
env['DEPOT_TOOLS_REPORT_BUILD'] = '%s/%s/%s/%s' % (
self.m.buildbucket.build.builder.project,
self.m.buildbucket.build.builder.bucket,
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json b/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json
index dc0942e38..748154030 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json
@@ -20,6 +20,7 @@
"--disable-syntax-validation"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
@@ -130,6 +131,7 @@
"--no_fetch_tags"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json b/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json
index ee30b4f51..6dd201c65 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json
@@ -20,6 +20,7 @@
"--disable-syntax-validation"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
@@ -130,6 +131,7 @@
"--no_fetch_tags"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json b/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json
index 0a2fda4b4..00dd4463c 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json
@@ -20,6 +20,7 @@
"--disable-syntax-validation"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
@@ -130,6 +131,7 @@
"--no_fetch_tags"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/input_commit_with_id_without_repo.json b/recipes/recipe_modules/bot_update/examples/full.expected/input_commit_with_id_without_repo.json
index cba81c0e7..3b2c6a6d4 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/input_commit_with_id_without_repo.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/input_commit_with_id_without_repo.json
@@ -19,6 +19,7 @@
"--disable-syntax-validation"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
@@ -129,6 +130,7 @@
"--no_fetch_tags"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json b/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json
index 00f676db4..9e83a8631 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json
@@ -23,6 +23,7 @@
"--disable-syntax-validation"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
@@ -133,6 +134,7 @@
"--no_fetch_tags"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/refs.json b/recipes/recipe_modules/bot_update/examples/full.expected/refs.json
index 9653ef0a1..56d613674 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/refs.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/refs.json
@@ -21,6 +21,7 @@
"--disable-syntax-validation"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
@@ -131,6 +132,7 @@
"--no_fetch_tags"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json b/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json
index c76f9bd2b..5bed757ce 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json
@@ -19,6 +19,7 @@
"--disable-syntax-validation"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
@@ -129,6 +130,7 @@
"--no_fetch_tags"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/with_experiments.json b/recipes/recipe_modules/bot_update/examples/full.expected/with_experiments.json
index 44f1a8b8a..a04deaa47 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/with_experiments.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/with_experiments.json
@@ -20,6 +20,7 @@
"--experiments=no_sync,cool_experiment"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
@@ -131,6 +132,7 @@
"--experiments=no_sync,cool_experiment"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json b/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json
index 400ae658a..c27151b38 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json
@@ -20,6 +20,7 @@
"--disable-syntax-validation"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
@@ -130,6 +131,7 @@
"--no_fetch_tags"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
diff --git a/recipes/recipes/fetch_end_to_end_test.expected/basic.json b/recipes/recipes/fetch_end_to_end_test.expected/basic.json
index 03af601a7..c2f7786d1 100644
--- a/recipes/recipes/fetch_end_to_end_test.expected/basic.json
+++ b/recipes/recipes/fetch_end_to_end_test.expected/basic.json
@@ -18,6 +18,7 @@
"depot_tools@HEAD"
],
"env": {
+ "DEPOT_TOOLS_COLLECT_METRICS": "0",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},