Skip to content

problem_report: use iterator in CompressedValue.write - #638

Open
bdrung wants to merge 5 commits into
canonical:mainfrom
bdrung:use-iterator
Open

problem_report: use iterator in CompressedValue.write#638
bdrung wants to merge 5 commits into
canonical:mainfrom
bdrung:use-iterator

Conversation

@bdrung

@bdrung bdrung commented Jul 27, 2026

Copy link
Copy Markdown
Member

Use the iterator version decode_compressed_stream in CompressedValue.write to avoid code duplication.

This is in preparation for #639 which is not ready yet.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.51%. Comparing base (2eacb11) to head (c44cde4).

Files with missing lines Patch % Lines
problem_report.py 90.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #638      +/-   ##
==========================================
+ Coverage   84.48%   84.51%   +0.02%     
==========================================
  Files         106      106              
  Lines       21018    20990      -28     
  Branches     3195     3184      -11     
==========================================
- Hits        17758    17739      -19     
+ Misses       2785     2781       -4     
+ Partials      475      470       -5     

☔ View full report in Codecov by Harness.
📢 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 requested a review from Hyask July 30, 2026 09:33
@bdrung
bdrung force-pushed the use-iterator branch 2 times, most recently from 7377c84 to 04090a3 Compare August 3, 2026 23:07
bdrung added 5 commits August 4, 2026 01:22
The method `decode_compressed_stream` is used outside of
`CompressedValue`. Move this method to a stand-alone function to ease
reusing it.
Do not rely on the implementation detail and create a real corrupted
core dump for testing `add_gdb_info` in
`test_add_gdb_info_damaged_gz_core`.
`CompressedValue.decode_compressed_stream` does not raise an `EOFError`
in case the file ended before the end-of-stream marker was reached, but
`gzip.GzipFile` would do that.
Make the code more readable and compact by instructing zlib to use
native gzip header and trailer processing.
Use the iterator version `decode_compressed_stream` in
`CompressedValue.write` to avoid code duplication.
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.

1 participant