From ad557c41da7ce606ef3c26cf9ab465f9e4c81456 Mon Sep 17 00:00:00 2001 From: Takuto Ikuta Date: Thu, 24 Oct 2019 08:00:50 +0000 Subject: [PATCH] presubmit: deprecate vpython_spec_path This property is not used anymore. Bug: 1002153 Change-Id: I19a503a73ec00e9121b2d9a2c130824a974d307a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1877747 Commit-Queue: Takuto Ikuta Auto-Submit: Takuto Ikuta Reviewed-by: Andrii Shyshkalov --- recipes/README.recipes.md | 8 ++++---- recipes/recipe_modules/presubmit/api.py | 2 -- recipes/recipe_modules/presubmit/properties.proto | 6 ++++-- recipes/recipe_modules/presubmit/test_api.py | 3 +-- recipes/recipe_modules/presubmit/tests/execute.py | 10 ---------- 5 files changed, 9 insertions(+), 20 deletions(-) diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index 579037e5a..f7c5a9e4b 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -753,11 +753,11 @@ Raises: #### **class [PresubmitApi](/recipes/recipe_modules/presubmit/api.py#11)([RecipeApi][recipe_engine/wkt/RecipeApi]):** -— **def [\_\_call\_\_](/recipes/recipe_modules/presubmit/api.py#27)(self, \*args, \*\*kwargs):** +— **def [\_\_call\_\_](/recipes/recipe_modules/presubmit/api.py#26)(self, \*args, \*\*kwargs):** Return a presubmit step. -— **def [execute](/recipes/recipe_modules/presubmit/api.py#75)(self, bot_update_step):** +— **def [execute](/recipes/recipe_modules/presubmit/api.py#74)(self, bot_update_step):** Runs presubmit and sets summary markdown if applicable. @@ -766,7 +766,7 @@ Args: Returns: a RawResult object, suitable for being returned from RunSteps. -— **def [prepare](/recipes/recipe_modules/presubmit/api.py#40)(self):** +— **def [prepare](/recipes/recipe_modules/presubmit/api.py#39)(self):** Set up a presubmit run. @@ -781,7 +781,7 @@ This expects the gclient configuration to already have been set. Returns: the StepResult from the bot_update step. -  **@property**
— **def [presubmit\_support\_path](/recipes/recipe_modules/presubmit/api.py#23)(self):** +  **@property**
— **def [presubmit\_support\_path](/recipes/recipe_modules/presubmit/api.py#22)(self):** ### *recipe_modules* / [tryserver](/recipes/recipe_modules/tryserver) [DEPS](/recipes/recipe_modules/tryserver/__init__.py#5): [gerrit](#recipe_modules-gerrit), [git](#recipe_modules-git), [git\_cl](#recipe_modules-git_cl), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step] diff --git a/recipes/recipe_modules/presubmit/api.py b/recipes/recipe_modules/presubmit/api.py index 2d80f884a..e7a9440ed 100644 --- a/recipes/recipe_modules/presubmit/api.py +++ b/recipes/recipe_modules/presubmit/api.py @@ -18,7 +18,6 @@ class PresubmitApi(recipe_api.RecipeApi): # According to event mon data we have, it seems like anything longer than # this is a bug, and should just instant fail. self._timeout_s = properties.timeout_s - self._vpython_spec_path = properties.vpython_spec_path @property def presubmit_support_path(self): @@ -241,4 +240,3 @@ def _createSummaryMarkdown(step_json): ' look at the stdout of the presubmit step.') ) return '\n\n'.join(error_messages) - diff --git a/recipes/recipe_modules/presubmit/properties.proto b/recipes/recipe_modules/presubmit/properties.proto index 737fa44ca..412ba073c 100644 --- a/recipes/recipe_modules/presubmit/properties.proto +++ b/recipes/recipe_modules/presubmit/properties.proto @@ -10,6 +10,8 @@ message InputProperties { bool runhooks = 1; // Timeout for presubmit execution, in seconds. int32 timeout_s = 2; - // The path to the vpython spec to use, relative to the repository root. - string vpython_spec_path = 3; + + // TODO(tikuta): remove this if this is not necessary. + reserved "vpython_spec_path"; + reserved 3; } diff --git a/recipes/recipe_modules/presubmit/test_api.py b/recipes/recipe_modules/presubmit/test_api.py index f6512d4da..b4772b205 100644 --- a/recipes/recipe_modules/presubmit/test_api.py +++ b/recipes/recipe_modules/presubmit/test_api.py @@ -8,13 +8,12 @@ from PB.recipe_modules.depot_tools.presubmit import properties class PresubmitTestApi(recipe_test_api.RecipeTestApi): - def __call__(self, runhooks=False, timeout_s=480, vpython_spec_path=None): + def __call__(self, runhooks=False, timeout_s=480): return self.m.properties( **{ '$depot_tools/presubmit': properties.InputProperties( runhooks=runhooks, timeout_s=timeout_s, - vpython_spec_path=vpython_spec_path, ), } ) diff --git a/recipes/recipe_modules/presubmit/tests/execute.py b/recipes/recipe_modules/presubmit/tests/execute.py index 57efd3dd5..3d0cbb4f9 100644 --- a/recipes/recipe_modules/presubmit/tests/execute.py +++ b/recipes/recipe_modules/presubmit/tests/execute.py @@ -56,15 +56,6 @@ def GenTests(api): api.post_process(post_process.DropExpectation) ) - yield ( - api.test('root_vpython') + - api.runtime(is_experimental=False, is_luci=True) + - api.buildbucket.try_build(project='infra') + - api.presubmit(vpython_spec_path='.vpython') + - api.post_process(post_process.StatusSuccess) + - api.post_process(post_process.DropExpectation) - ) - yield ( api.test('timeout') + api.runtime(is_experimental=False, is_luci=True) + @@ -248,4 +239,3 @@ def GenTests(api): api.post_process(post_process.ResultReason, bug_msg) + api.post_process(post_process.DropExpectation) ) -