From ea50265aefdf0a262fdf315c2f4193345f6cefca Mon Sep 17 00:00:00 2001 From: Stephen Martinis Date: Thu, 3 May 2018 22:35:00 +0000 Subject: [PATCH] Revert "Reland "bot_update: Patch on gclient by default."" This reverts commit 8f20428bf4dc574b138a63ae705b74af3945cdda. Reason for revert: Probably broke bot update on catapult bots: https://build.chromium.org/p/tryserver.client.catapult/builders/Catapult%20Linux%20Tryserver/builds/11225 Original change's description: > Reland "bot_update: Patch on gclient by default." > > This is a reland of e38cf570fc8c0df53b576c179701efe6d683f7d2 > > The issue with win CQ bots was fixed in https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1036309 > It was due to misconfigured git user.{name,email} > > Original change's description: > > bot_update: Patch on gclient by default. > > > > See [4] for the design doc for this change. > > > > We're moving the patching logic from bot_update to gclient. > > This way we can test patches of dependencies that modify their DEPS > > files as well, for example when ANGLE uploads a patch that modifies > > DEPS files to be tested by a Chromium trybot. > > > > Chromium Linux CQ and Angle trybots are already running this way > > (see [1] and [2]) and a PSA has already been sent [3] > > > > [1] https://chromium.googlesource.com/chromium/src/+/master/infra/config/global/cr-buildbucket.cfg#214 > > [2] https://chromium.googlesource.com/angle/angle/+/infra/config/cr-buildbucket.cfg#105 > > [3] https://groups.google.com/a/google.com/forum/#!topic/chrome-infra/FVHN2kdUX4I > > [4] https://docs.google.com/document/d/1GSTw4ysm5AYjNR6vMA7NJUxLK2VN9IpOEp_v0u-wyOE/edit?ts=5ad78165# > > > > Bug: 643346 > > Change-Id: Ic9a9dcfae86aca730d35fbb26c26b21135e05bf3 > > Recipe-Nontrivial-Roll: skia > > Recipe-Nontrivial-Roll: infra > > Recipe-Nontrivial-Roll: build_limited_scripts_slave > > Recipe-Nontrivial-Roll: skiabuildbot > > Recipe-Nontrivial-Roll: build > > Recipe-Nontrivial-Roll: release_scripts > > Reviewed-on: https://chromium-review.googlesource.com/1014356 > > Commit-Queue: Edward Lesmes > > Reviewed-by: Aaron Gable > > Bug: 643346 > Change-Id: I4f4edd8e815cb12a4cbc3ab690eaf588bc2accc1 > Reviewed-on: https://chromium-review.googlesource.com/1039966 > Reviewed-by: Andrii Shyshkalov > Commit-Queue: Edward Lesmes TBR=agable@chromium.org,tandrii@chromium.org,ehmaldonado@chromium.org Change-Id: Ia8a5779cde3c31812121cffdd806476d4536f35e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 643346 Reviewed-on: https://chromium-review.googlesource.com/1043167 Reviewed-by: Stephen Martinis Commit-Queue: Stephen Martinis --- recipes/recipe_modules/bot_update/api.py | 6 +++--- ...ly_patch_on_gclient.json => apply_patch_on_gclient.json} | 4 ++-- recipes/recipe_modules/bot_update/examples/full.py | 4 ++-- recipes/recipe_modules/bot_update/resources/bot_update.py | 4 +--- 4 files changed, 8 insertions(+), 10 deletions(-) rename recipes/recipe_modules/bot_update/examples/full.expected/{no_apply_patch_on_gclient.json => apply_patch_on_gclient.json} (99%) diff --git a/recipes/recipe_modules/bot_update/api.py b/recipes/recipe_modules/bot_update/api.py index be2426c321..12ec205d1c 100644 --- a/recipes/recipe_modules/bot_update/api.py +++ b/recipes/recipe_modules/bot_update/api.py @@ -15,7 +15,7 @@ class BotUpdateApi(recipe_api.RecipeApi): patch_gerrit_url, revision, parent_got_revision, deps_revision_overrides, fail_patch, *args, **kwargs): self._apply_patch_on_gclient = properties.get( - 'apply_patch_on_gclient', True) + 'apply_patch_on_gclient', False) self._issue = patch_issue self._patchset = patch_set self._repository = repository or patch_repository_url @@ -207,8 +207,8 @@ class BotUpdateApi(recipe_api.RecipeApi): cmd.append('--gerrit_no_rebase_patch_ref') if disable_syntax_validation or cfg.disable_syntax_validation: cmd.append('--disable-syntax-validation') - if not self._apply_patch_on_gclient: - cmd.append('--no-apply-patch-on-gclient') + if self._apply_patch_on_gclient: + cmd.append('--apply-patch-on-gclient') # Inject Json output for testing. first_sln = cfg.solutions[0].name diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json b/recipes/recipe_modules/bot_update/examples/full.expected/apply_patch_on_gclient.json similarity index 99% rename from recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json rename to recipes/recipe_modules/bot_update/examples/full.expected/apply_patch_on_gclient.json index 25887e98e2..81fdb28cfc 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/apply_patch_on_gclient.json @@ -69,7 +69,7 @@ "--revision", "src/third_party/angle@HEAD", "--disable-syntax-validation", - "--no-apply-patch-on-gclient" + "--apply-patch-on-gclient" ], "env_prefixes": { "PATH": [ @@ -170,7 +170,7 @@ "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", "--revision", "src/third_party/angle@fac9503c46405f77757b9a728eb85b8d7bc6080c", - "--no-apply-patch-on-gclient" + "--apply-patch-on-gclient" ], "env_prefixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.py b/recipes/recipe_modules/bot_update/examples/full.py index 010bdd8a48..88a936a6f2 100644 --- a/recipes/recipe_modules/bot_update/examples/full.py +++ b/recipes/recipe_modules/bot_update/examples/full.py @@ -193,12 +193,12 @@ def GenTests(api): patch_issue=338811, patch_set=3, ) - yield api.test('no_apply_patch_on_gclient') + api.properties.tryserver( + yield api.test('apply_patch_on_gclient') + api.properties.tryserver( gerrit_project='angle/angle', patch_issue=338811, patch_set=3, ) + api.bot_update.properties( - apply_patch_on_gclient=False, + apply_patch_on_gclient=True, ) yield api.test('tryjob_gerrit_v8') + api.properties.tryserver( gerrit_project='v8/v8', diff --git a/recipes/recipe_modules/bot_update/resources/bot_update.py b/recipes/recipe_modules/bot_update/resources/bot_update.py index 45434e307a..9fe32e106c 100755 --- a/recipes/recipe_modules/bot_update/resources/bot_update.py +++ b/recipes/recipe_modules/bot_update/resources/bot_update.py @@ -1053,9 +1053,7 @@ def parse_args(): parse.add_option( '--disable-syntax-validation', action='store_true', help='Disable validation of .gclient and DEPS syntax.') - parse.add_option('--no-apply-patch-on-gclient', - dest='apply_patch_on_gclient', action='store_false', - default=True, + parse.add_option('--apply-patch-on-gclient', action='store_true', help='Patch the gerrit ref in gclient instead of here.') options, args = parse.parse_args()