Skip to content

problem_report: fix file extension for zstd compressed values#575

Merged
bdrung merged 2 commits intocanonical:mainfrom
bdrung:zstd-compression
Apr 24, 2026
Merged

problem_report: fix file extension for zstd compressed values#575
bdrung merged 2 commits intocanonical:mainfrom
bdrung:zstd-compression

Conversation

@bdrung
Copy link
Copy Markdown
Member

@bdrung bdrung commented Apr 20, 2026

When Apport is used with systemd-coredump, the CoreDump is zstd compressed (instead of gzip). When filing Launchpad bugs, the zstd compressed CoreDump is attached to the bug named CoreDump.gz.

Support zstd compressed values in ProblemReport.write_mime.

Tested with:

divide-by-zero
PYTHONPATH=$(pwd) APPORT_LAUNCHPAD_INSTANCE=qastaging bin/apport-cli /var/crash/_usr_bin_divide-by-zero.1000.crash

LP: #2148656

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.52%. Comparing base (b434538) to head (a36ff96).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #575      +/-   ##
==========================================
+ Coverage   84.47%   84.52%   +0.05%     
==========================================
  Files         104      104              
  Lines       20926    20984      +58     
  Branches     3212     3217       +5     
==========================================
+ Hits        17677    17737      +60     
+ Misses       2808     2806       -2     
  Partials      441      441              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bdrung bdrung force-pushed the zstd-compression branch 3 times, most recently from 40ce78f to 4a31139 Compare April 22, 2026 10:03
Copy link
Copy Markdown
Contributor

@Hyask Hyask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that looks good to me.

bdrung added 2 commits April 24, 2026 15:03
Refactor `problem_report.py` by introducing the helper function
`_create_compressed_attachment` in preparation for following commits.

Ensure that the type of `attach_value` is either `None` or `bytes`.

Bug: https://launchpad.net/bugs/2148656
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
When Apport is used with systemd-coredump, the CoreDump is zstd
compressed (instead of gzip). When filing Launchpad bugs, the zstd
compressed CoreDump is attached to the bug named `CoreDump.gz`.

Support zstd compressed values in `ProblemReport.write_mime`.

Tested with:

```
divide-by-zero
PYTHONPATH=$(pwd) APPORT_LAUNCHPAD_INSTANCE=qastaging bin/apport-cli /var/crash/_usr_bin_divide-by-zero.1000.crash
```

Bug: https://launchpad.net/bugs/2148656
@bdrung bdrung force-pushed the zstd-compression branch from 4a31139 to 67d85e3 Compare April 24, 2026 13:13
@bdrung
Copy link
Copy Markdown
Member Author

bdrung commented Apr 24, 2026

Just rebased.

@bdrung bdrung force-pushed the zstd-compression branch from 67d85e3 to a36ff96 Compare April 24, 2026 13:15
@bdrung bdrung merged commit a36ff96 into canonical:main Apr 24, 2026
19 checks passed
@bdrung bdrung deleted the zstd-compression branch April 24, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants