From 5585c87a78b77d4bdab2a58f636ced7918b6b021 Mon Sep 17 00:00:00 2001 From: Andrii Shyshkalov Date: Sat, 23 Feb 2019 00:22:59 +0000 Subject: [PATCH] Revert "Pass target branch from tryserver in bot_update module" This reverts commit 245337d62e22e410b8c3f7a037e9c34252a72aef. Reason for revert: broke presubmit builders running run_presubmit.py recipe. Original change's description: > Pass target branch from tryserver in bot_update module > > Change-Id: I9d250c87355833ddc6c7d8f41e9e43575713925f > > Recipe-Nontrivial-Roll: build_limited_scripts_slave > Recipe-Nontrivial-Roll: skia > Recipe-Nontrivial-Roll: infra > Recipe-Nontrivial-Roll: build > Recipe-Nontrivial-Roll: release_scripts > Change-Id: I9d250c87355833ddc6c7d8f41e9e43575713925f > Reviewed-on: https://chromium-review.googlesource.com/c/1420977 > Commit-Queue: William Hesse > Reviewed-by: Edward Lesmes TBR=whesse@google.com,ehmaldonado@chromium.org Change-Id: I89513b5bb053788291e79340c1685189adc794ec No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/1484655 Reviewed-by: Andrii Shyshkalov Commit-Queue: Andrii Shyshkalov --- recipes/README.recipes.md | 4 ++-- recipes/recipe_modules/bot_update/api.py | 6 ++---- .../full.expected/deprecated_got_revision_mapping.json | 2 +- .../examples/full.expected/no_apply_patch_on_gclient.json | 2 +- .../bot_update/examples/full.expected/tryjob_fail.json | 2 +- .../examples/full.expected/tryjob_fail_patch.json | 2 +- .../examples/full.expected/tryjob_fail_patch_download.json | 2 +- .../examples/full.expected/tryjob_gerrit_angle.json | 2 +- .../examples/full.expected/tryjob_gerrit_branch_heads.json | 2 +- .../full.expected/tryjob_gerrit_feature_branch.json | 2 +- .../full.expected/tryjob_gerrit_v8_feature_branch.json | 2 +- .../examples/full.expected/tryjob_gerrit_webrtc.json | 2 +- .../bot_update/examples/full.expected/tryjob_v8.json | 2 +- .../examples/full.expected/tryjob_v8_head_by_default.json | 2 +- 14 files changed, 16 insertions(+), 18 deletions(-) diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index 9cd36eb1a0..dd36dd2253 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -52,7 +52,7 @@ Recipe module to ensure a checkout is consistent on a bot. Wrapper for easy calling of bot_update. -— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#413)(self, bot_update_step):** +— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#411)(self, bot_update_step):** Deapplies a patch, taking care of DEPS and solution revisions properly. @@ -68,7 +68,7 @@ Args: manifest_name: The name of the manifest to upload to LogDog. This must be unique for the whole build. -— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#390)(self, project_name, gclient_config=None):** +— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#388)(self, project_name, gclient_config=None):** Returns all property names used for storing the checked-out revision of a given project. diff --git a/recipes/recipe_modules/bot_update/api.py b/recipes/recipe_modules/bot_update/api.py index 217f03b94d..2bf154902c 100644 --- a/recipes/recipe_modules/bot_update/api.py +++ b/recipes/recipe_modules/bot_update/api.py @@ -128,10 +128,8 @@ class BotUpdateApi(recipe_api.RecipeApi): if patch: repo_url = self.m.tryserver.gerrit_change_repo_url fetch_ref = self.m.tryserver.gerrit_change_fetch_ref - target_ref = self.m.tryserver.gerrit_change_target_ref - if repo_url and fetch_ref and target_ref: - flags.append( - ['--patch_ref', '%s@%s:%s' % (repo_url, target_ref, fetch_ref)]) + if repo_url and fetch_ref: + flags.append(['--patch_ref', '%s@%s' % (repo_url, fetch_ref)]) if patch_refs: flags.extend( ['--patch_ref', patch_ref] diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json b/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json index a3ef456ccf..d023d167da 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/chromium/src@refs/heads/master:refs/changes/56/123456/7", + "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", "--revision", "src@HEAD", "--disable-syntax-validation" 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/no_apply_patch_on_gclient.json index db8c4931ec..15e69d6ccf 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/no_apply_patch_on_gclient.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/angle/angle@refs/heads/master:refs/changes/56/123456/7", + "https://chromium.googlesource.com/angle/angle@refs/changes/56/123456/7", "--revision", "src@HEAD", "--revision", diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json index 7443bf367a..84cf400b34 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/chromium/src@refs/heads/master:refs/changes/56/123456/7", + "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", "--revision", "src@HEAD", "--disable-syntax-validation" diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json index 0654a4bd5e..5b1a618c4f 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/chromium/src@refs/heads/master:refs/changes/56/123456/7", + "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", "--revision", "src@HEAD", "--disable-syntax-validation" diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json index c93c3029f9..f8551c48ef 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/chromium/src@refs/heads/master:refs/changes/56/123456/7", + "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", "--revision", "src@HEAD", "--disable-syntax-validation" diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json index db8c4931ec..15e69d6ccf 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/angle/angle@refs/heads/master:refs/changes/56/123456/7", + "https://chromium.googlesource.com/angle/angle@refs/changes/56/123456/7", "--revision", "src@HEAD", "--revision", diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json index 71c195f74c..717544d5fd 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/chromium/src@refs/branch-heads/67:refs/changes/56/123456/7", + "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", "--revision", "src@refs/branch-heads/67", "--refs", diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json index 6374012711..fc5623ba40 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/chromium/src@refs/heads/experimental/feature:refs/changes/56/123456/7", + "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", "--revision", "src@experimental/feature", "--disable-syntax-validation" diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json index 6b71257d2e..d1a08a03b5 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/v8/v8@refs/heads/experimental/feature:refs/changes/56/123456/7", + "https://chromium.googlesource.com/v8/v8@refs/changes/56/123456/7", "--revision", "src@HEAD", "--revision", diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json index b4b4ccd2bf..c7de0a0e4f 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://webrtc.googlesource.com/src@refs/heads/master:refs/changes/56/123456/7", + "https://webrtc.googlesource.com/src@refs/changes/56/123456/7", "--revision", "src@HEAD", "--revision", diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json index ab573ea574..910d6882d5 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/v8/v8@refs/heads/master:refs/changes/56/123456/7", + "https://chromium.googlesource.com/v8/v8@refs/changes/56/123456/7", "--revision", "src@HEAD", "--revision", diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json index ac2147030e..fb1108b7ae 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/v8/v8@refs/heads/master:refs/changes/56/123456/7", + "https://chromium.googlesource.com/v8/v8@refs/changes/56/123456/7", "--revision", "src@HEAD", "--revision",