Add ability to ignore errors during breakpad symbol generation

Implement the fields added in
https://chromium-review.googlesource.com/c/chromiumos/infra/proto/+/4507337
in the service API.

BUG=b:270240549,b:241470012
TEST=Confirmed `cros_generate_breakpad_symbols --board=tatl` gets error
about missing ASH_CHROME, but `cros_generate_breakpad_symbols
--board=tatl --ignore_expected_file=ASH_CHROME` does not.
TEST=Commented out most of EXPECTED_POOR_SYMBOLIZATION_FILES. Confirmed
`cros_generate_breakpad_symbols --board=eve` generated errors but
`cros_generate_breakpad_symbols --board=eve --ignore_errors` did not.
TEST=CQ

Change-Id: I54af6b043b00866358277b1981bf5e05992915e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4529455
Reviewed-by: Alex Klein <saklein@chromium.org>
Commit-Queue: Ian Barkley-Yeung <iby@chromium.org>
Tested-by: Ian Barkley-Yeung <iby@chromium.org>
diff --git a/api/controller/sysroot.py b/api/controller/sysroot.py
index ecb3287..d6ad97d 100644
--- a/api/controller/sysroot.py
+++ b/api/controller/sysroot.py
@@ -115,12 +115,39 @@
     Returns:
         A list of dictionary mappings of ArtifactType to list of paths.
     """
+
+    def _BundleBreakpadSymbols(chroot, sysroot_class, build_target, output_dir):
+        ignore_breakpad_symbol_generation_expected_files = [
+            common_pb2.ArtifactsByService.Sysroot.BreakpadSymbolGenerationExpectedFile.Name(
+                x
+            )
+            for x in in_proto.ignore_breakpad_symbol_generation_expected_files
+            if x
+            != common_pb2.ArtifactsByService.Sysroot.BreakpadSymbolGenerationExpectedFile.EXPECTED_FILE_UNSET
+            and x
+            in common_pb2.ArtifactsByService.Sysroot.BreakpadSymbolGenerationExpectedFile.values()
+        ]
+
+        ignore_breakpad_symbol_generation_expected_files = [
+            x[len("EXPECTED_FILE_") :]
+            for x in ignore_breakpad_symbol_generation_expected_files
+        ]
+
+        return sysroot.BundleBreakpadSymbols(
+            chroot,
+            sysroot_class,
+            build_target,
+            output_dir,
+            in_proto.ignore_breakpad_symbol_generation_errors,
+            ignore_breakpad_symbol_generation_expected_files,
+        )
+
     generated = []
     # pylint: disable=line-too-long
     artifact_types = {
         in_proto.ArtifactType.SIMPLE_CHROME_SYSROOT: sysroot.CreateSimpleChromeSysroot,
         in_proto.ArtifactType.CHROME_EBUILD_ENV: sysroot.CreateChromeEbuildEnv,
-        in_proto.ArtifactType.BREAKPAD_DEBUG_SYMBOLS: sysroot.BundleBreakpadSymbols,
+        in_proto.ArtifactType.BREAKPAD_DEBUG_SYMBOLS: _BundleBreakpadSymbols,
         in_proto.ArtifactType.DEBUG_SYMBOLS: sysroot.BundleDebugSymbols,
         in_proto.ArtifactType.FUZZER_SYSROOT: sysroot.CreateFuzzerSysroot,
         in_proto.ArtifactType.SYSROOT_ARCHIVE: sysroot.ArchiveSysroot,