Commit 756e98f5 authored by Josip Sokcevic's avatar Josip Sokcevic Committed by LUCI CQ

Mark patch failures as regular failures, not infra

Patch failures shouldn't be treated as infra_failures (as long as patch
was successfully downloaded).

Prior to https://crbug.com/1207685, bot_update patch failurs were set as
successful step to work around buildbucket plugin requirements.

One alternative approach is to add necessary information into patch
failure step, by editing its presentation.

R=gavinmak@google.com

Bug: 1207685, 1255228
Change-Id: I696356d40a80536c3efbca99091536b8b25deb40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3219890Reviewed-by: 's avatarGavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
parent 384bae2e
......@@ -57,7 +57,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#527)(self, bot_update_step):**
&mdash; **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.
&mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#504)(self, project_name, gclient_config=None):**
&mdash; **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
&emsp; **@property**<br>&mdash; **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#47)(self):**
&mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#455)(self, bot_update_json, name):**
&mdash; **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.
......
......@@ -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()
......
......@@ -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@@@"
]
},
{
......
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