[tools] Change CoreDumpArchiver to not default throw

This prevents missing core dumps from crashing bots a la:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8846992204042276416/+/u/vm_tests_shard_1/task_stdout_stderr:_vm_tests_shard_1

Bug: https://github.com/dart-lang/sdk/issues/36469
Change-Id: If66e40d8cb2df7ece7c1274fbbdcbffda445056d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200865
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
This commit is contained in:
Clement Skau 2021-05-20 11:49:16 +00:00 committed by commit-bot@chromium.org
parent 67f097a161
commit 14d5ca1721

View file

@ -825,13 +825,13 @@ class BaseCoreDumpArchiver(object):
self._upload(files)
if missing:
self._report_missing_crashes(missing, throw=True)
self._report_missing_crashes(missing, throw=False)
# todo(athom): move the logic to decide where to copy core dumps into the recipes.
def _is_shard(self):
return 'BUILDBOT_BUILDERNAME' not in os.environ
def _report_missing_crashes(self, missing, throw=True):
def _report_missing_crashes(self, missing, throw=False):
missing_as_string = ', '.join([str(c) for c in missing])
other_files = list(glob.glob(os.path.join(self._search_dir, '*')))
sys.stderr.write(
@ -1071,7 +1071,7 @@ class WindowsCoreDumpArchiver(BaseCoreDumpArchiver):
if crash.pid in self._dumps_by_pid:
return self._dumps_by_pid[crash.pid]
def _report_missing_crashes(self, missing, throw=True):
def _report_missing_crashes(self, missing, throw=False):
# Let's only print the debugging information and not throw. We'll do more
# validation for werfault.exe and throw afterwards.
super(WindowsCoreDumpArchiver, self)._report_missing_crashes(