Commit 68c71a34 authored by Edward Lesmes's avatar Edward Lesmes Committed by LUCI CQ

bot_update: Set DEPOT_TOOLS_REPORT_BUILD to report bot metrics.

Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: chrome_release
Change-Id: I704ac523a3212ea30061948f8a9971a373d5394f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2861214
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
parent ad9487ab
......@@ -58,12 +58,12 @@ Recipe module to ensure a checkout is consistent on a bot.
Wrapper for easy calling of bot_update.
&mdash; **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#530)(self, bot_update_step):**
&mdash; **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#536)(self, bot_update_step):**
Deapplies a patch, taking care of DEPS and solution revisions properly.
&mdash; **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#71)(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):**
&mdash; **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):**
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.
&mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#507)(self, project_name, gclient_config=None):**
&mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#513)(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.
&emsp; **@property**<br>&mdash; **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#39)(self):**
&emsp; **@property**<br>&mdash; **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#45)(self):**
&mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#458)(self, bot_update_json, name):**
&mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#464)(self, bot_update_json, name):**
Sets a fixed revision for a single dependency using project revision
properties.
......
......@@ -32,6 +32,12 @@ 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:
env['DEPOT_TOOLS_REPORT_BUILD'] = '%s/%s/%s/%s' % (
self.m.buildbucket.build.builder.project,
self.m.buildbucket.build.builder.bucket,
self.m.buildbucket.build.builder.builder,
self.m.buildbucket.build.id)
with self.m.context(env=env):
with self.m.depot_tools.on_path():
return self.m.python(name, bot_update_path, cmd, **kwargs)
......
......@@ -23,6 +23,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/ci/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -23,6 +23,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/ci/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -21,6 +21,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/ci/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -22,6 +22,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/ci/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -21,6 +21,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/ci/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -66,6 +66,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......@@ -139,6 +140,7 @@
"--no_fetch_tags"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -68,6 +68,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......@@ -183,6 +184,7 @@
"--no_fetch_tags"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -21,6 +21,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/ci/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -21,6 +21,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/ci/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -21,6 +21,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/ci/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -21,6 +21,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/ci/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -21,6 +21,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/ci/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -21,6 +21,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/ci/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -19,6 +19,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/ci/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -66,6 +66,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -66,6 +66,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -66,6 +66,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -68,6 +68,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......@@ -183,6 +184,7 @@
"--no_fetch_tags"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -68,6 +68,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......@@ -180,6 +181,7 @@
"--no_fetch_tags"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -68,6 +68,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......@@ -180,6 +181,7 @@
"--no_fetch_tags"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -68,6 +68,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......@@ -183,6 +184,7 @@
"--no_fetch_tags"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -68,6 +68,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......@@ -193,6 +194,7 @@
"--no_fetch_tags"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -68,6 +68,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......@@ -183,6 +184,7 @@
"--no_fetch_tags"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -68,6 +68,7 @@
"--disable-syntax-validation"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......@@ -183,6 +184,7 @@
"--no_fetch_tags"
],
"env": {
"DEPOT_TOOLS_REPORT_BUILD": "chromium/src/try/linux/8945511751514863184",
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "1800"
},
......
......@@ -366,8 +366,6 @@ def call_gclient(*args, **kwargs):
"""
cmd = [sys.executable, '-u', GCLIENT_PATH]
cmd.extend(args)
# Disable metrics collection on bots, since it's not supported anyway.
kwargs.setdefault('env', {})['DEPOT_TOOLS_METRICS'] = '0'
return call(*cmd, **kwargs)
......
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