Commit d56d2c28 authored by Robert Iannucci's avatar Robert Iannucci Committed by LUCI CQ

Remove source_manifest functionality from depot_tools.

This is essentially defunct; We will want to add something like this
back in, but it's so sparsely used right now that it's better to just
remove it and then add it back properly when we're ready to support
it across all of LUCI.

R=yiwzhang@google.com

Bug: 1093959
Change-Id: I72673515d860234daa3b01514ac38168ebb4825a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2250403
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: 's avatarYiwei Zhang <yiwzhang@google.com>
parent ceb64a4f
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
### *recipe_modules* / [bot\_update](/recipes/recipe_modules/bot_update) ### *recipe_modules* / [bot\_update](/recipes/recipe_modules/bot_update)
[DEPS](/recipes/recipe_modules/bot_update/__init__.py#1): [depot\_tools](#recipe_modules-depot_tools), [gclient](#recipe_modules-gclient), [gerrit](#recipe_modules-gerrit), [gitiles](#recipe_modules-gitiles), [tryserver](#recipe_modules-tryserver), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/commit\_position][recipe_engine/recipe_modules/commit_position], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/cq][recipe_engine/recipe_modules/cq], [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/runtime][recipe_engine/recipe_modules/runtime], [recipe\_engine/source\_manifest][recipe_engine/recipe_modules/source_manifest], [recipe\_engine/step][recipe_engine/recipe_modules/step] [DEPS](/recipes/recipe_modules/bot_update/__init__.py#1): [depot\_tools](#recipe_modules-depot_tools), [gclient](#recipe_modules-gclient), [gerrit](#recipe_modules-gerrit), [gitiles](#recipe_modules-gitiles), [tryserver](#recipe_modules-tryserver), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/commit\_position][recipe_engine/recipe_modules/commit_position], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/cq][recipe_engine/recipe_modules/cq], [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/runtime][recipe_engine/recipe_modules/runtime], [recipe\_engine/step][recipe_engine/recipe_modules/step]
Recipe module to ensure a checkout is consistent on a bot. Recipe module to ensure a checkout is consistent on a bot.
...@@ -56,12 +56,12 @@ Recipe module to ensure a checkout is consistent on a bot. ...@@ -56,12 +56,12 @@ Recipe module to ensure a checkout is consistent on a bot.
Wrapper for easy calling of bot_update. Wrapper for easy calling of bot_update.
&mdash; **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#513)(self, bot_update_step):** &mdash; **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#500)(self, bot_update_step):**
Deapplies a patch, taking care of DEPS and solution revisions properly. Deapplies a patch, taking care of DEPS and solution revisions properly.
&mdash; **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#76)(self, gclient_config=None, suffix=None, patch=True, update_presentation=True, patch_root=None, with_branch_heads=False, with_tags=False, no_fetch_tags=False, refs=None, patch_oauth2=None, oauth2_json=None, use_site_config_creds=None, clobber=False, root_solution_revision=None, rietveld=None, issue=None, patchset=None, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, disable_syntax_validation=False, manifest_name=None, patch_refs=None, ignore_input_commit=False, set_output_commit=False, step_test_data=None, \*\*kwargs):** &mdash; **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#76)(self, gclient_config=None, suffix=None, patch=True, update_presentation=True, patch_root=None, with_branch_heads=False, with_tags=False, no_fetch_tags=False, refs=None, patch_oauth2=None, oauth2_json=None, use_site_config_creds=None, clobber=False, root_solution_revision=None, rietveld=None, issue=None, patchset=None, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, disable_syntax_validation=False, patch_refs=None, ignore_input_commit=False, set_output_commit=False, step_test_data=None, \*\*kwargs):**
Args: Args:
gclient_config: The gclient configuration to use when running bot_update. gclient_config: The gclient configuration to use when running bot_update.
...@@ -73,8 +73,6 @@ Args: ...@@ -73,8 +73,6 @@ Args:
disable_syntax_validation: (legacy) Disables syntax validation for DEPS. disable_syntax_validation: (legacy) Disables syntax validation for DEPS.
Needed as migration paths for recipes dealing with older revisions, Needed as migration paths for recipes dealing with older revisions,
such as bisect. such as bisect.
manifest_name: The name of the manifest to upload to LogDog. This must
be unique for the whole build.
ignore_input_commit: if True, ignore api.buildbucket.gitiles_commit. ignore_input_commit: if True, ignore api.buildbucket.gitiles_commit.
Exists for historical reasons. Please do not use. Exists for historical reasons. Please do not use.
set_output_commit: if True, mark the checked out commit as the set_output_commit: if True, mark the checked out commit as the
...@@ -87,7 +85,7 @@ Args: ...@@ -87,7 +85,7 @@ Args:
step_test_data: a null function that returns test bot_update.py output. step_test_data: a null function that returns test bot_update.py output.
Use test_api.output_json to generate test data. Use test_api.output_json to generate test data.
&mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#490)(self, project_name, gclient_config=None):** &mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#477)(self, project_name, gclient_config=None):**
Returns all property names used for storing the checked-out revision of Returns all property names used for storing the checked-out revision of
a given project. a given project.
...@@ -105,7 +103,7 @@ Returns (list of str): All properties that'll hold the checked-out revision ...@@ -105,7 +103,7 @@ Returns (list of str): All properties that'll hold the checked-out revision
&emsp; **@property**<br>&mdash; **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#44)(self):** &emsp; **@property**<br>&mdash; **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#44)(self):**
&mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#440)(self, bot_update_json, name):** &mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#427)(self, bot_update_json, name):**
Set a fixed revision for a single dependency using project revision Set a fixed revision for a single dependency using project revision
properties. properties.
...@@ -1051,7 +1049,6 @@ Move things around in a loop! ...@@ -1051,7 +1049,6 @@ Move things around in a loop!
[recipe_engine/recipe_modules/python]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/cd7b0d3bd66d697759ea2e0f0f4f6bf39b09e8d6/README.recipes.md#recipe_modules-python [recipe_engine/recipe_modules/python]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/cd7b0d3bd66d697759ea2e0f0f4f6bf39b09e8d6/README.recipes.md#recipe_modules-python
[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/cd7b0d3bd66d697759ea2e0f0f4f6bf39b09e8d6/README.recipes.md#recipe_modules-raw_io [recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/cd7b0d3bd66d697759ea2e0f0f4f6bf39b09e8d6/README.recipes.md#recipe_modules-raw_io
[recipe_engine/recipe_modules/runtime]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/cd7b0d3bd66d697759ea2e0f0f4f6bf39b09e8d6/README.recipes.md#recipe_modules-runtime [recipe_engine/recipe_modules/runtime]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/cd7b0d3bd66d697759ea2e0f0f4f6bf39b09e8d6/README.recipes.md#recipe_modules-runtime
[recipe_engine/recipe_modules/source_manifest]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/cd7b0d3bd66d697759ea2e0f0f4f6bf39b09e8d6/README.recipes.md#recipe_modules-source_manifest
[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/cd7b0d3bd66d697759ea2e0f0f4f6bf39b09e8d6/README.recipes.md#recipe_modules-step [recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/cd7b0d3bd66d697759ea2e0f0f4f6bf39b09e8d6/README.recipes.md#recipe_modules-step
[recipe_engine/recipe_modules/url]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/cd7b0d3bd66d697759ea2e0f0f4f6bf39b09e8d6/README.recipes.md#recipe_modules-url [recipe_engine/recipe_modules/url]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/cd7b0d3bd66d697759ea2e0f0f4f6bf39b09e8d6/README.recipes.md#recipe_modules-url
[recipe_engine/recipe_modules/version]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/cd7b0d3bd66d697759ea2e0f0f4f6bf39b09e8d6/README.recipes.md#recipe_modules-version [recipe_engine/recipe_modules/version]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/cd7b0d3bd66d697759ea2e0f0f4f6bf39b09e8d6/README.recipes.md#recipe_modules-version
......
...@@ -14,7 +14,6 @@ DEPS = [ ...@@ -14,7 +14,6 @@ DEPS = [
'recipe_engine/python', 'recipe_engine/python',
'recipe_engine/raw_io', 'recipe_engine/raw_io',
'recipe_engine/runtime', 'recipe_engine/runtime',
'recipe_engine/source_manifest',
'recipe_engine/step', 'recipe_engine/step',
'tryserver', 'tryserver',
] ]
......
...@@ -94,7 +94,6 @@ class BotUpdateApi(recipe_api.RecipeApi): ...@@ -94,7 +94,6 @@ class BotUpdateApi(recipe_api.RecipeApi):
gerrit_no_reset=False, gerrit_no_reset=False,
gerrit_no_rebase_patch_ref=False, gerrit_no_rebase_patch_ref=False,
disable_syntax_validation=False, disable_syntax_validation=False,
manifest_name=None,
patch_refs=None, patch_refs=None,
ignore_input_commit=False, ignore_input_commit=False,
set_output_commit=False, set_output_commit=False,
...@@ -111,8 +110,6 @@ class BotUpdateApi(recipe_api.RecipeApi): ...@@ -111,8 +110,6 @@ class BotUpdateApi(recipe_api.RecipeApi):
disable_syntax_validation: (legacy) Disables syntax validation for DEPS. disable_syntax_validation: (legacy) Disables syntax validation for DEPS.
Needed as migration paths for recipes dealing with older revisions, Needed as migration paths for recipes dealing with older revisions,
such as bisect. such as bisect.
manifest_name: The name of the manifest to upload to LogDog. This must
be unique for the whole build.
ignore_input_commit: if True, ignore api.buildbucket.gitiles_commit. ignore_input_commit: if True, ignore api.buildbucket.gitiles_commit.
Exists for historical reasons. Please do not use. Exists for historical reasons. Please do not use.
set_output_commit: if True, mark the checked out commit as the set_output_commit: if True, mark the checked out commit as the
...@@ -317,16 +314,6 @@ class BotUpdateApi(recipe_api.RecipeApi): ...@@ -317,16 +314,6 @@ class BotUpdateApi(recipe_api.RecipeApi):
step_text = result['step_text'] step_text = result['step_text']
step_result.presentation.step_text = step_text step_result.presentation.step_text = step_text
# Export the step results as a Source Manifest to LogDog.
source_manifest = result.get('source_manifest', {})
if manifest_name:
if not patch:
# The param "patched" is purely cosmetic to mean "if false, this
# bot_update run exists purely to unpatch an existing patch".
manifest_name += '_unpatched'
self.m.source_manifest.set_json_manifest(
manifest_name, source_manifest)
# Set output commit of the build. # Set output commit of the build.
if set_output_commit: if set_output_commit:
# As of April 2019, got_revision describes the output commit, # As of April 2019, got_revision describes the output commit,
......
[
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
"--spec-path",
"cache_dir = '[CACHE]/git'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
"--revision_mapping_file",
"{\"got_angle_revision\": \"src/third_party/angle\", \"got_cr_revision\": \"src\", \"got_revision\": \"src\", \"got_v8_revision\": \"src/v8\"}",
"--git-cache-dir",
"[CACHE]/git",
"--cleanup-dir",
"[CLEANUP]/bot_update",
"--output_json",
"/path/to/tmp/json",
"--revision",
"src@2d72510e447ab60a9728aeea2362d8be2cbd7789",
"--refs",
"refs/heads/master",
"--disable-syntax-validation"
],
"env": {
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
"GIT_HTTP_LOW_SPEED_TIME": "300"
},
"env_suffixes": {
"DEPOT_TOOLS_UPDATE": [
"0"
],
"PATH": [
"RECIPE_REPO[depot_tools]"
]
},
"infra_step": true,
"name": "bot_update (without patch)",
"~followup_annotations": [
"@@@STEP_LOG_LINE@json.output@{@@@",
"@@@STEP_LOG_LINE@json.output@ \"source_manifest\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"directories\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"src\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://chromium.googlesource.com/chromium/src.git\", @@@",
"@@@STEP_LOG_LINE@json.output@ \"revision\": \"ea17a292ecfb3dcdaa8dd226e67d6504fc13c15a\"@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@}@@@",
"@@@STEP_LOG_END@json.output@@@"
]
},
{
"name": "$result"
}
]
\ No newline at end of file
...@@ -55,7 +55,6 @@ def RunSteps(api): ...@@ -55,7 +55,6 @@ def RunSteps(api):
gerrit_no_reset = True if api.properties.get('gerrit_no_reset') else False gerrit_no_reset = True if api.properties.get('gerrit_no_reset') else False
gerrit_no_rebase_patch_ref = bool( gerrit_no_rebase_patch_ref = bool(
api.properties.get('gerrit_no_rebase_patch_ref')) api.properties.get('gerrit_no_rebase_patch_ref'))
manifest_name = api.properties.get('manifest_name')
patch_refs = api.properties.get('patch_refs') patch_refs = api.properties.get('patch_refs')
set_output_commit = api.properties.get('set_output_commit', True) set_output_commit = api.properties.get('set_output_commit', True)
...@@ -74,7 +73,6 @@ def RunSteps(api): ...@@ -74,7 +73,6 @@ def RunSteps(api):
gerrit_no_reset=gerrit_no_reset, gerrit_no_reset=gerrit_no_reset,
gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref, gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref,
disable_syntax_validation=True, disable_syntax_validation=True,
manifest_name=manifest_name,
patch_refs=patch_refs, patch_refs=patch_refs,
set_output_commit=set_output_commit, set_output_commit=set_output_commit,
step_test_data=step_test_data, step_test_data=step_test_data,
...@@ -124,27 +122,6 @@ def GenTests(api): ...@@ -124,27 +122,6 @@ def GenTests(api):
ci_build() + ci_build() +
api.runtime(is_experimental=False, is_luci=True) api.runtime(is_experimental=False, is_luci=True)
) )
yield (
api.test('with_manifest_name') +
ci_build() +
api.properties(
manifest_name='checkout',
set_output_commit=False,
) +
api.step_data('bot_update (without patch)', api.json.output({
'source_manifest': {
'directories': {
'src': {
'git_checkout': {
'repo_url': (
'https://chromium.googlesource.com/chromium/src.git'),
'revision': 'ea17a292ecfb3dcdaa8dd226e67d6504fc13c15a'
},
},
},
},
}))
)
yield ( yield (
api.test('resolve_chromium_fixed_version') + api.test('resolve_chromium_fixed_version') +
ci_build() + ci_build() +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment