Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions apport/crashdb_impl/launchpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import apport.crashdb
import apport.logging
import apport.report
import problem_report
from apport.packaging_impl import impl as packaging

DEFAULT_LAUNCHPAD_INSTANCE = "production"
Expand All @@ -55,7 +56,7 @@ def filter_filename(attachments):
apport.logging.error("Broken attachment on bug, ignoring")
continue
name = f.filename
if name.endswith(".txt") or name.endswith(".gz"):
if name.endswith(".txt") or name.endswith(".gz") or name.endswith(".zst"):
yield f


Expand Down Expand Up @@ -374,6 +375,10 @@ def download(self, crash_id):
raise
attachment.seek(0)
report[key] = attachment.read()
elif ext == ".zst":
report[key] = problem_report.CompressedValue(
name=key, compressed_value=attachment.read()
)
else:
raise NotImplementedError(
f"Unknown attachment type: {attachment.filename}"
Expand Down Expand Up @@ -494,7 +499,7 @@ def update_traces(self, crash_id, report, comment=""):
# remove core dump if stack trace is usable
if report.has_useful_stacktrace():
for a in bug.attachments:
if a.title == "CoreDump.gz":
if a.title in {"CoreDump.gz", "CoreDump.zst"}:
try:
a.removeFromBug()
except HTTPError:
Expand Down Expand Up @@ -773,6 +778,7 @@ def close_duplicate(self, report, crash_id, master_id):
for a in bug.attachments:
if a.title in {
"CoreDump.gz",
"CoreDump.zst",
"Stacktrace.txt",
"ThreadStacktrace.txt",
"ProcMaps.txt",
Expand Down Expand Up @@ -949,7 +955,7 @@ def mark_retrace_failed(
)

for a in bug.attachments:
if a.title == "CoreDump.gz":
if a.title in {"CoreDump.gz", "CoreDump.zst"}:
try:
a.removeFromBug()
except HTTPError:
Expand Down
Loading