report: Simplify and split big add_proc_info#539
Open
bdrung wants to merge 4 commits intocanonical:mainfrom
Open
report: Simplify and split big add_proc_info#539bdrung wants to merge 4 commits intocanonical:mainfrom
bdrung wants to merge 4 commits intocanonical:mainfrom
Conversation
`Report.add_proc_info` will always set `proc_pid_fd`. So the helper function `_read_proc_link` is not needed any more.
`Report.add_proc_info` will always set `proc_pid_fd`. So the case for `dir_fd` being `None` in `_read_proc_file` can be dropped and the parameter `pid` will not be needed any more.
Add the helper method `_add_executable_path` to break down the big method.
Split the big `Report.add_proc_info` method into two methods.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #539 +/- ##
=======================================
Coverage 84.21% 84.22%
=======================================
Files 104 104
Lines 20778 20776 -2
Branches 3253 3251 -2
=======================================
Hits 17498 17498
Misses 2827 2827
+ Partials 453 451 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
schopin-pro
reviewed
Jun 12, 2025
Contributor
schopin-pro
left a comment
There was a problem hiding this comment.
Let's be clear: if it's not a bugfix (as in, an actual bug encountered by real people, not a linter or typechecker complaint), I'll just ignore any review request. This one falls clearly in the "not a bugfix" category.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was working on https://launchpad.net/bugs/2098792 and reading the code
add_proc_infofor that. This PR is the result of making the code more readable. Then I noticed that_add_executable_timestampwas not called byadd_proc_infoin these crashes.See individual commits for details.