[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>
This commit is contained in:
parent
b2e3934569
commit
2f62de01d3
@ -225,6 +225,7 @@ func kitchenTask(name, recipe, isolate, serviceAccount string, dimensions []stri
|
||||
"buildbucket_build_id": specs.PLACEHOLDER_BUILDBUCKET_BUILD_ID,
|
||||
"buildername": name,
|
||||
"patch_issue": specs.PLACEHOLDER_ISSUE,
|
||||
"patch_ref": specs.PLACEHOLDER_PATCH_REF,
|
||||
"patch_repo": specs.PLACEHOLDER_PATCH_REPO,
|
||||
"patch_set": specs.PLACEHOLDER_PATCHSET,
|
||||
"patch_storage": specs.PLACEHOLDER_PATCH_STORAGE,
|
||||
@ -1098,7 +1099,7 @@ func presubmit(b *specs.TasksCfgBuilder, name string) string {
|
||||
"category": "cq",
|
||||
"patch_gerrit_url": "https://skia-review.googlesource.com",
|
||||
"patch_project": "skia",
|
||||
"patch_ref": fmt.Sprintf("refs/changes/%s/%s/%s", specs.PLACEHOLDER_ISSUE_SHORT, specs.PLACEHOLDER_ISSUE, specs.PLACEHOLDER_PATCHSET),
|
||||
"patch_ref": specs.PLACEHOLDER_PATCH_REF,
|
||||
"reason": "CQ",
|
||||
"repo_name": "skia",
|
||||
}
|
||||
|
@ -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:
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user