diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index a14ee4ea21..6842aa8444 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -57,7 +57,7 @@ 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#527)(self, bot_update_step):** +— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#532)(self, bot_update_step):** Deapplies a patch, taking care of DEPS and solution revisions properly. @@ -94,7 +94,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#504)(self, project_name, gclient_config=None):** +— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#509)(self, project_name, gclient_config=None):** Returns all property names used for storing the checked-out revision of a given project. @@ -110,7 +110,7 @@ Returns (list of str): All properties that'll hold the checked-out revision   **@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#455)(self, bot_update_json, name):** +— **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#460)(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 bb25170763..68b6cd47be 100644 --- a/recipes/recipe_modules/bot_update/api.py +++ b/recipes/recipe_modules/bot_update/api.py @@ -315,7 +315,9 @@ class BotUpdateApi(recipe_api.RecipeApi): # Ah hah! Now that everything is in place, lets run bot_update! step_result = None try: - step_result = self(name, cmd, step_test_data=step_test_data, **kwargs) + # 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), **kwargs) except self.m.step.StepFailure as f: step_result = f.result raise @@ -346,6 +348,9 @@ class BotUpdateApi(recipe_api.RecipeApi): raise self.m.step.InfraFailure( 'Patch failure: Git reported a download failure') else: + # Mark it as failure so we provide useful logs + # https://crbug.com/1207685 + step_result.presentation.status = 'FAILURE' # This is actual patch failure. self.m.tryserver.set_patch_failure_tryjob_result() self.m.cq.set_do_not_retry_build() diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json index 0596b0f229..594ad96cba 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json @@ -189,7 +189,7 @@ "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/main@{#170242}\"@@@", "@@@SET_BUILD_PROPERTY@got_v8_revision@\"801ada225ddc271c132c3a35f03975671d43e399\"@@@", "@@@SET_BUILD_PROPERTY@got_v8_revision_cp@\"refs/heads/main@{#43426}\"@@@", - "@@@STEP_EXCEPTION@@@" + "@@@STEP_FAILURE@@@" ] }, {