commit 9e847c99415470e95924c4ddce1d67f45d6afd79
parent def15d086080e20db9162c5a1e0fc75352574b8d
Author: Rob Wu <rob@robwu.nl>
Date: Thu, 8 Jan 2026 14:43:22 +0000
Bug 2007615 - Exclude minidump files from condprof artifact r=sparky
Differential Revision: https://phabricator.services.mozilla.com/D278058
Diffstat:
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/testing/condprofile/condprof/archiver.py b/testing/condprofile/condprof/archiver.py
@@ -38,6 +38,21 @@ class Archiver:
return os.path.join(self.archives_dir, archive), archive
def create_archive(self, when, iterator=None):
+
+ def _filter(tarinfo):
+ name = tarinfo.name
+ if name.endswith((".dmp", ".extra")) and "minidumps" in name:
+ # Inore crash files such as:
+ # - minidumps/5b2d4a13-54e6-5ebb-9a6f-913a3451e56a.dmp
+ # - minidumps/5b2d4a13-54e6-5ebb-9a6f-913a3451e56a.extra
+ # ... because they can cause permafailing tests (bug 2007615).
+ #
+ # We are excluding them here instead of removing the crash dump
+ # from the filesystem before archival, in case anyone wants to
+ # inspect these files.
+ return None
+ return tarinfo
+
if iterator is None:
def _files(tar):
@@ -45,7 +60,7 @@ class Archiver:
yield len(files)
for filename in files:
try:
- tar.add(filename, os.path.basename(filename))
+ tar.add(filename, os.path.basename(filename), filter=_filter)
yield filename
except FileNotFoundError: # NOQA
# locks and such
diff --git a/testing/condprofile/condprof/creator.py b/testing/condprofile/condprof/creator.py
@@ -122,7 +122,8 @@ class ProfileCreator:
]
for name in names:
- # remove `cache` from profile
+ # The following removes files from the profile before archival. An
+ # alternative is to exclude the file in the _filter of create_archive.
shutil.rmtree(os.path.join(self.env.profile, "cache"), ignore_errors=True)
shutil.rmtree(os.path.join(self.env.profile, "cache2"), ignore_errors=True)