Revert "In case of failure copy gen_snapshots over to flutter_logs dir."

This reverts commit 971f48cdd7fe71c15066714f33a41b47b5d50622 since this experiment is now complete.


Revert "Fix location for gen_snapshot that has to get copied."

This reverts commit d643d6dc5adfe2ffcac821da0fc727f13b929855 as it supports revert above.

BUG=https://github.com/flutter/flutter/issues/156324
Change-Id: I37aed594ec9c0f8de9e3a35eaeccc2a03282703b
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/60300
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
diff --git a/recipe_modules/build_util/api.py b/recipe_modules/build_util/api.py
index 9f876ce..bf45bd2 100644
--- a/recipe_modules/build_util/api.py
+++ b/recipe_modules/build_util/api.py
@@ -129,28 +129,8 @@
         self.m.step(name, ninja_args)
       except self.m.step.StepFailure:
         self._upload_crash_reproducer(env)
-        """
-        This is to troubleshoot https://github.com/flutter/flutter/issues/154437
-        """
-        self._upload_gen_snapshot(build_dir, env)
         raise
 
-  def _upload_gen_snapshot(self, build_dir, env):
-    """Uploads gen_snapshots to GCS when crash happens."""
-    flutter_logs_dir = env['FLUTTER_LOGS_DIR']
-    with self.m.step.nest("upload gen_snapshots"), self.m.context(
-        infra_steps=True):
-      gen_snapshots = self.m.file.glob_paths(
-          "find gen_snapshots",
-          build_dir / "clang_arm64",
-          "gen_snapshot",
-          test_data=(build_dir / "clang_arm64/gen_snapshot",),
-      )
-      for gen_snapshot in gen_snapshots:
-        self.m.file.copy(
-            'Copy gen_snapshot file %s' % gen_snapshot, gen_snapshot, flutter_logs_dir
-        )
-
   def _upload_crash_reproducer(self, env):
     """Uploads crash reproducer files to GCS when clang crash happens."""
     clang_crash_diagnostics_dir = env['CLANG_CRASH_DIAGNOSTICS_DIR']
diff --git a/recipe_modules/build_util/examples/full.expected/win.json b/recipe_modules/build_util/examples/full.expected/win.json
index 5be1661..0bf02ba 100644
--- a/recipe_modules/build_util/examples/full.expected/win.json
+++ b/recipe_modules/build_util/examples/full.expected/win.json
@@ -673,62 +673,6 @@
     "name": "copy crash file"
   },
   {
-    "cmd": [],
-    "name": "upload gen_snapshots"
-  },
-  {
-    "cmd": [
-      "vpython3",
-      "-u",
-      "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py",
-      "--json-output",
-      "/path/to/tmp/json",
-      "glob",
-      "[START_DIR]\\out\\release\\clang_arm64",
-      "gen_snapshot"
-    ],
-    "env_suffixes": {
-      "DEPOT_TOOLS_UPDATE": [
-        "0"
-      ],
-      "PATH": [
-        "RECIPE_REPO[depot_tools]"
-      ]
-    },
-    "infra_step": true,
-    "name": "upload gen_snapshots.find gen_snapshots",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@glob@[START_DIR]\\out\\release\\clang_arm64\\[START_DIR]\\out\\release\\clang_arm64\\gen_snapshot@@@",
-      "@@@STEP_LOG_END@glob@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "vpython3",
-      "-u",
-      "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py",
-      "--json-output",
-      "/path/to/tmp/json",
-      "copy",
-      "[START_DIR]\\out\\release\\clang_arm64\\[START_DIR]\\out\\release\\clang_arm64\\gen_snapshot",
-      "[START_DIR]"
-    ],
-    "env_suffixes": {
-      "DEPOT_TOOLS_UPDATE": [
-        "0"
-      ],
-      "PATH": [
-        "RECIPE_REPO[depot_tools]"
-      ]
-    },
-    "infra_step": true,
-    "name": "upload gen_snapshots.Copy gen_snapshot file [START_DIR]\\out\\release\\clang_arm64\\[START_DIR]\\out\\release\\clang_arm64\\gen_snapshot",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
     "failure": {
       "failure": {},
       "humanReason": "Step('build release mytarget') (retcode: 1)"