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: Yiwei Zhang <yiwzhang@google.com>
diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md
index 0c5d564..7e148c1 100644
--- a/recipes/README.recipes.md
+++ b/recipes/README.recipes.md
@@ -46,7 +46,7 @@
 
 ### *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.
 
@@ -56,12 +56,12 @@
 
 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.
     
 
-&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:
   gclient_config: The gclient configuration to use when running bot_update.
@@ -73,8 +73,6 @@
   disable_syntax_validation: (legacy) Disables syntax validation for DEPS.
     Needed as migration paths for recipes dealing with older revisions,
     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.
     Exists for historical reasons. Please do not use.
   set_output_commit: if True, mark the checked out commit as the
@@ -87,7 +85,7 @@
   step_test_data: a null function that returns test bot_update.py output.
     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
 a given project.
@@ -105,7 +103,7 @@
 
 &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
 properties.
@@ -1051,7 +1049,6 @@
 [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/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/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
diff --git a/recipes/recipe_modules/bot_update/__init__.py b/recipes/recipe_modules/bot_update/__init__.py
index 7463ec6..f5a7d07 100644
--- a/recipes/recipe_modules/bot_update/__init__.py
+++ b/recipes/recipe_modules/bot_update/__init__.py
@@ -14,7 +14,6 @@
     'recipe_engine/python',
     'recipe_engine/raw_io',
     'recipe_engine/runtime',
-    'recipe_engine/source_manifest',
     'recipe_engine/step',
     'tryserver',
 ]
diff --git a/recipes/recipe_modules/bot_update/api.py b/recipes/recipe_modules/bot_update/api.py
index 6700815..a898f67 100644
--- a/recipes/recipe_modules/bot_update/api.py
+++ b/recipes/recipe_modules/bot_update/api.py
@@ -94,7 +94,6 @@
                       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,
@@ -111,8 +110,6 @@
       disable_syntax_validation: (legacy) Disables syntax validation for DEPS.
         Needed as migration paths for recipes dealing with older revisions,
         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.
         Exists for historical reasons. Please do not use.
       set_output_commit: if True, mark the checked out commit as the
@@ -317,16 +314,6 @@
           step_text = result['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.
         if set_output_commit:
           # As of April 2019, got_revision describes the output commit,
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name.json b/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name.json
deleted file mode 100644
index 49fa5c3..0000000
--- a/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name.json
+++ /dev/null
@@ -1,56 +0,0 @@
-[
-  {
-    "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
diff --git a/recipes/recipe_modules/bot_update/examples/full.py b/recipes/recipe_modules/bot_update/examples/full.py
index 9141fbb..981c383 100644
--- a/recipes/recipe_modules/bot_update/examples/full.py
+++ b/recipes/recipe_modules/bot_update/examples/full.py
@@ -55,7 +55,6 @@
   gerrit_no_reset = True if api.properties.get('gerrit_no_reset') else False
   gerrit_no_rebase_patch_ref = bool(
       api.properties.get('gerrit_no_rebase_patch_ref'))
-  manifest_name = api.properties.get('manifest_name')
   patch_refs = api.properties.get('patch_refs')
   set_output_commit = api.properties.get('set_output_commit', True)
 
@@ -74,7 +73,6 @@
       gerrit_no_reset=gerrit_no_reset,
       gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref,
       disable_syntax_validation=True,
-      manifest_name=manifest_name,
       patch_refs=patch_refs,
       set_output_commit=set_output_commit,
       step_test_data=step_test_data,
@@ -125,27 +123,6 @@
       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 (
       api.test('resolve_chromium_fixed_version') +
       ci_build() +
       api.properties(resolve_chromium_fixed_version=True)