Upload git traces if bot_update doesn't exit with ok_ret

Recipe-Nontrivial-Roll: build
Bug: 1517126
Change-Id: I04a6e369a9d0fb50e0dfd18f4bd23ecc0c1c40d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5186756
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
changes/56/5186756/3
Gavin Mak 1 year ago committed by LUCI CQ
parent 0cba8dd68e
commit 85142e0ee1

@ -62,7 +62,7 @@ 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#593)(self, bot_update_step):**
&mdash; **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#595)(self, bot_update_step):**
Deapplies a patch, taking care of DEPS and solution revisions properly.
@ -103,7 +103,7 @@ Args:
change's commit message to get this revision override requested by the
author.
&mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#570)(self, project_name, gclient_config=None):**
&mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#572)(self, project_name, gclient_config=None):**
Returns all property names used for storing the checked-out revision of
a given project.
@ -119,7 +119,7 @@ Returns (list of str): All properties that'll hold the checked-out revision
&emsp; **@property**<br>&mdash; **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#41)(self):**
&mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#521)(self, bot_update_json, name):**
&mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#523)(self, bot_update_json, name):**
Sets a fixed revision for a single dependency using project revision
properties.

@ -362,12 +362,13 @@ class BotUpdateApi(recipe_api.RecipeApi):
# Ah hah! Now that everything is in place, lets run bot_update!
step_result = None
ok_ret = (0, 88)
try:
# Error code 88 is the 'patch failure' code for patch apply failure.
step_result = self(name,
cmd,
step_test_data=step_test_data,
ok_ret=(0, 88),
ok_ret=ok_ret,
**kwargs)
finally:
step_result = self.m.step.active_result
@ -416,7 +417,8 @@ class BotUpdateApi(recipe_api.RecipeApi):
'Patch failure: See patch error log attached to bot_update. '
'Try rebasing?')
if (step_result.exc_result.was_cancelled
if (step_result.exc_result.retcode not in ok_ret
or step_result.exc_result.was_cancelled
or step_result.exc_result.had_timeout):
self._upload_traces()

Loading…
Cancel
Save