aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules
diff options
context:
space:
mode:
authorGravatar Eric Boren <borenet@google.com>2018-05-03 09:56:48 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-03 14:37:31 +0000
commit2f62de01d3a703696dc1a51d2473a88be68a7574 (patch)
tree7339422225190d4788f97802e7700b23a35133bc /infra/bots/recipe_modules
parentb2e3934569d101063b4bc5518c966a03c9d81d6e (diff)
[recipes] Mostly remove bot_update patch_ref hack
We need to do some refactoring to remove the repository hack for cross-repo tryjobs. Bug: skia:6473 Change-Id: Ie96fba75f6f1752575a4c7cc5b0208a37f0bd73d Reviewed-on: https://skia-review.googlesource.com/125724 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra/bots/recipe_modules')
-rw-r--r--infra/bots/recipe_modules/core/api.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/infra/bots/recipe_modules/core/api.py b/infra/bots/recipe_modules/core/api.py
index 901623601a..6155316215 100644
--- a/infra/bots/recipe_modules/core/api.py
+++ b/infra/bots/recipe_modules/core/api.py
@@ -142,11 +142,13 @@ class SkiaApi(recipe_api.RecipeApi):
chromium.revision = 'origin/lkcr'
# Run bot_update.
-
- # Hack the patch ref if necessary.
- if self.m.bot_update._issue and self.m.bot_update._patchset:
- self.m.bot_update._gerrit_ref = self.patch_ref(
- str(self.m.bot_update._issue), str(self.m.bot_update._patchset))
+ if patch_repo != self.m.properties['repository']:
+ # TODO(borenet): bot_update uses the 'repository' property to determine
+ # which repo the patch should come from. This conflicts with our usage of
+ # the same property to determine which root repo to check out, which may
+ # not be the same as the repository the patch comes from, for which we use
+ # the patch_repo property. Remove this hack by refactoring our checkout
+ # code and properties to agree with bot_update.
self.m.bot_update._repository = patch_repo
if not self.m.vars.is_trybot and is_parent_revision: