Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(734)

Unified Diff: recipe_modules/bot_update/api.py

Issue 2308193002: Remove bogus master/builder/slave/force parameters from bot_update. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: recipe_modules/bot_update/api.py
diff --git a/recipe_modules/bot_update/api.py b/recipe_modules/bot_update/api.py
index d88d929938bcbbc954d9e835c5c8eca5f8b6ed02..708c87046ba88cae1441650090c656935c0949e0 100644
--- a/recipe_modules/bot_update/api.py
+++ b/recipe_modules/bot_update/api.py
@@ -10,13 +10,9 @@ from recipe_engine import recipe_api
class BotUpdateApi(recipe_api.RecipeApi):
- def __init__(self, mastername, buildername, slavename, issue, patchset,
- patch_url, repository, gerrit_ref, rietveld, revision,
- parent_got_revision, deps_revision_overrides, fail_patch,
- *args, **kwargs):
- self._mastername = mastername
- self._buildername = buildername
- self._slavename = slavename
+ def __init__(self, issue, patchset, patch_url, repository, gerrit_ref,
+ rietveld, revision, parent_got_revision, deps_revision_overrides,
+ fail_patch, *args, **kwargs):
self._issue = issue
self._patchset = patchset
self._patch_url = patch_url
@@ -70,7 +66,7 @@ class BotUpdateApi(recipe_api.RecipeApi):
def ensure_checkout(self, gclient_config=None, suffix=None,
patch=True, update_presentation=True,
- force=False, patch_root=None, no_shallow=False,
+ patch_root=None, no_shallow=False,
with_branch_heads=False, refs=None,
patch_oauth2=False, use_site_config_creds=True,
output_manifest=True, clobber=False,
@@ -98,11 +94,6 @@ class BotUpdateApi(recipe_api.RecipeApi):
assert cfg is not None, (
'missing gclient_config or forgot api.gclient.set_config(...) before?')
- # Used by bot_update to determine if we want to run or not.
- master = self._mastername
- builder = self._buildername
- slave = self._slavename
-
# Construct our bot_update command. This basically be inclusive of
# everything required for bot_update to know:
root = patch_root
@@ -162,18 +153,13 @@ class BotUpdateApi(recipe_api.RecipeApi):
rev_map = cfg.got_revision_mapping.as_jsonish()
flags = [
- # 1. Do we want to run? (master/builder/slave).
- ['--master', master],
- ['--builder', builder],
- ['--slave', slave],
-
- # 2. What do we want to check out (spec/root/rev/rev_map).
+ # What do we want to check out (spec/root/rev/rev_map).
['--spec', self.m.gclient.config_to_pythonish(cfg)],
['--root', root],
['--revision_mapping_file', self.m.json.input(rev_map)],
['--git-cache-dir', cfg.cache_dir],
- # 3. How to find the patch, if any (issue/patchset/patch_url).
+ # How to find the patch, if any (issue/patchset/patch_url).
['--issue', issue],
['--patchset', patchset],
['--patch_url', patch_url],
@@ -183,7 +169,7 @@ class BotUpdateApi(recipe_api.RecipeApi):
['--apply_issue_email_file', email_file],
['--apply_issue_key_file', key_file],
- # 4. Hookups to JSON output back into recipes.
+ # JSON output back into recipes.
['--output_json', self.m.json.output()],]
@@ -223,8 +209,6 @@ class BotUpdateApi(recipe_api.RecipeApi):
if clobber:
cmd.append('--clobber')
- if force:
- cmd.append('--force')
if no_shallow:
cmd.append('--no_shallow')
if output_manifest:
@@ -239,8 +223,7 @@ class BotUpdateApi(recipe_api.RecipeApi):
# Inject Json output for testing.
first_sln = cfg.solutions[0].name
step_test_data = lambda: self.test_api.output_json(
- master, builder, slave, root, first_sln, rev_map, force,
- self._fail_patch,
+ root, first_sln, rev_map, self._fail_patch,
output_manifest=output_manifest, fixed_revisions=fixed_revisions)
# Add suffixes to the step name, if specified.

Powered by Google App Engine
This is Rietveld 408576698