Skip to content

Some apport-retrace refactoring#297

Draft
schopin-pro wants to merge 4 commits intocanonical:mainfrom
schopin-pro:retrace-refactor
Draft

Some apport-retrace refactoring#297
schopin-pro wants to merge 4 commits intocanonical:mainfrom
schopin-pro:retrace-refactor

Conversation

@schopin-pro
Copy link
Contributor

A couple of commits that split out some code out of apport-retrace's main() and into helper functions.

Depends on #295

@schopin-pro
Copy link
Contributor Author

Marking as Draft since there are no tests to back it up.

@codecov
Copy link

codecov bot commented Feb 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (69e81cf) 81.86% compared to head (7418eb2) 81.86%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #297   +/-   ##
=======================================
  Coverage   81.86%   81.86%           
=======================================
  Files          93       93           
  Lines       19030    19030           
  Branches     3047     3047           
=======================================
  Hits        15578    15578           
  Misses       2949     2949           
  Partials      503      503           

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

This reduces complexity in main() while also addressing the unbound crashid
issue that showed up in Noble, albeit only partially: now it's not
unbound, but it can be None, which is another can of worms.

Baby steps!
As it turns out testing for `options.report` being falsy meant that
crashid was defined, but I'd rather test it directly as it's a bit
cumbersome to trace (and it made pylint crazy).
While the contextmanager method is still too complex, it's another step
towards reducing the overall complexity of the file.
@bdrung
Copy link
Member

bdrung commented Jun 20, 2025

#295 and #542 were merged. So only the "retrace: delegate sandbox management in a context manager" commit is left, which needs to be rebased.

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