From 8ac1b465512d72c0bea0eb9f2de6a499b847e497 Mon Sep 17 00:00:00 2001 From: Andrii Shyshkalov Date: Fri, 7 Feb 2020 18:26:20 +0000 Subject: [PATCH] Delete tryserver.set_do_not_retry. Use cq.set_do_not_retry instead. See https://crrev.com/c/2040838 R=yiwzhang Change-Id: I110c398e794c19df30c42aa77e88a5da5d33276d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2040709 Commit-Queue: Yiwei Zhang Reviewed-by: Yiwei Zhang Auto-Submit: Andrii Shyshkalov --- recipes/README.recipes.md | 25 +++++++------------ recipes/recipe_modules/tryserver/api.py | 10 -------- .../full.expected/with_gerrit_patch.json | 7 ------ .../with_gerrit_patch_and_target_ref.json | 7 ------ .../full.expected/with_wrong_patch.json | 7 ------ .../full.expected/with_wrong_patch_new.json | 7 ------ .../recipe_modules/tryserver/examples/full.py | 1 - 7 files changed, 9 insertions(+), 55 deletions(-) diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index 1c8eed1af..1137b84f5 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -829,11 +829,11 @@ Argument: Returned paths will be relative to to patch_root. -— **def [get\_footer](/recipes/recipe_modules/tryserver/api.py#255)(self, tag, patch_text=None):** +— **def [get\_footer](/recipes/recipe_modules/tryserver/api.py#245)(self, tag, patch_text=None):** Gets a specific tag from a CL description -— **def [get\_footers](/recipes/recipe_modules/tryserver/api.py#235)(self, patch_text=None):** +— **def [get\_footers](/recipes/recipe_modules/tryserver/api.py#225)(self, patch_text=None):** Retrieves footers from the patch description. @@ -852,20 +852,13 @@ Returns true iff the properties exist to match a Gerrit issue. Returns true iff we have a change to check out. -— **def [normalize\_footer\_name](/recipes/recipe_modules/tryserver/api.py#259)(self, footer):** +— **def [normalize\_footer\_name](/recipes/recipe_modules/tryserver/api.py#249)(self, footer):** -— **def [set\_compile\_failure\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#198)(self):** +— **def [set\_compile\_failure\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#188)(self):** Mark the tryjob result as a compile failure. -— **def [set\_do\_not\_retry\_build](/recipes/recipe_modules/tryserver/api.py#184)(self):** - -A flag to indicate the build should not be retried by the CQ. - -This mechanism is used to reduce CQ duration when retrying will likely -return an identical result. - -— **def [set\_invalid\_test\_results\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#210)(self):** +— **def [set\_invalid\_test\_results\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#200)(self):** Mark the tryjob result as having invalid test results. @@ -873,7 +866,7 @@ This means we run some tests, but the results were not valid (e.g. no list of specific test cases that failed, or too many tests failing, etc). -— **def [set\_patch\_failure\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#194)(self):** +— **def [set\_patch\_failure\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#184)(self):** Mark the tryjob result as failure to apply the patch. @@ -884,21 +877,21 @@ Adds a subproject tag to the build. This can be used to distinguish between builds that execute different steps depending on what was patched, e.g. blink vs. pure chromium patches. -— **def [set\_test\_expired\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#227)(self):** +— **def [set\_test\_expired\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#217)(self):** Mark the tryjob result as a test expiration. This means a test task expired and was never scheduled, most likely due to lack of capacity. -— **def [set\_test\_failure\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#202)(self):** +— **def [set\_test\_failure\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#192)(self):** Mark the tryjob result as a test failure. This means we started running actual tests (not prerequisite steps like checkout or compile), and some of these tests have failed. -— **def [set\_test\_timeout\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#219)(self):** +— **def [set\_test\_timeout\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#209)(self):** Mark the tryjob result as a test timeout. diff --git a/recipes/recipe_modules/tryserver/api.py b/recipes/recipe_modules/tryserver/api.py index 547560d4e..c94840eb7 100644 --- a/recipes/recipe_modules/tryserver/api.py +++ b/recipes/recipe_modules/tryserver/api.py @@ -181,16 +181,6 @@ class TryserverApi(recipe_api.RecipeApi): step_result.presentation.step_text = failure_type step_result.presentation.status = 'FAILURE' - def set_do_not_retry_build(self): - """A flag to indicate the build should not be retried by the CQ. - - This mechanism is used to reduce CQ duration when retrying will likely - return an identical result. - """ - # TODO(iannucci): add API to set properties regardless of the current step. - step_result = self.m.step('TRYJOB DO NOT RETRY', cmd=None) - step_result.presentation.properties['do_not_retry'] = True - def set_patch_failure_tryjob_result(self): """Mark the tryjob result as failure to apply the patch.""" self._set_failure_type('PATCH_FAILURE') diff --git a/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch.json b/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch.json index db2538bdc..b7e2541a1 100644 --- a/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch.json +++ b/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch.json @@ -136,13 +136,6 @@ "@@@STEP_FAILURE@@@" ] }, - { - "cmd": [], - "name": "TRYJOB DO NOT RETRY", - "~followup_annotations": [ - "@@@SET_BUILD_PROPERTY@do_not_retry@true@@@" - ] - }, { "cmd": [], "name": "TRYJOB FAILURE (2)", diff --git a/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch_and_target_ref.json b/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch_and_target_ref.json index 348c161da..d2edfe91f 100644 --- a/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch_and_target_ref.json +++ b/recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch_and_target_ref.json @@ -136,13 +136,6 @@ "@@@STEP_FAILURE@@@" ] }, - { - "cmd": [], - "name": "TRYJOB DO NOT RETRY", - "~followup_annotations": [ - "@@@SET_BUILD_PROPERTY@do_not_retry@true@@@" - ] - }, { "cmd": [], "name": "TRYJOB FAILURE (2)", diff --git a/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch.json b/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch.json index d5a7fb723..c14988855 100644 --- a/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch.json +++ b/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch.json @@ -15,13 +15,6 @@ "@@@STEP_LOG_END@files@@@" ] }, - { - "cmd": [], - "name": "TRYJOB DO NOT RETRY", - "~followup_annotations": [ - "@@@SET_BUILD_PROPERTY@do_not_retry@true@@@" - ] - }, { "name": "$result" } diff --git a/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch_new.json b/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch_new.json index 869505a40..4099accd5 100644 --- a/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch_new.json +++ b/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch_new.json @@ -16,13 +16,6 @@ "@@@STEP_LOG_END@files@@@" ] }, - { - "cmd": [], - "name": "TRYJOB DO NOT RETRY", - "~followup_annotations": [ - "@@@SET_BUILD_PROPERTY@do_not_retry@true@@@" - ] - }, { "name": "$result" } diff --git a/recipes/recipe_modules/tryserver/examples/full.py b/recipes/recipe_modules/tryserver/examples/full.py index ded683754..07b529602 100644 --- a/recipes/recipe_modules/tryserver/examples/full.py +++ b/recipes/recipe_modules/tryserver/examples/full.py @@ -43,7 +43,6 @@ def RunSteps(api): api.tryserver.set_subproject_tag('v8') api.tryserver.set_patch_failure_tryjob_result() - api.tryserver.set_do_not_retry_build() api.tryserver.set_compile_failure_tryjob_result() api.tryserver.set_test_failure_tryjob_result() api.tryserver.set_invalid_test_results_tryjob_result()