← Back to issue list

`subprocess.run` emitting wrapper

View original Github issue

Metadata

Project
craft-parts
Number
#1023
Type
issue
State
open
Author
mattculler
Labels
Created
Updated
Closed

Current evaluation

Feature request for a general subprocess wrapper that logs the command and prefixes output lines with ':: ', consolidating craft-parts' process_run; unlabelled, a contributor asked for implementation guidance 42 days ago with no maintainer response.

Suggested action: needs triage

Reason: The issue has no labels, no assignee, and no maintainer response; a contributor (karkra911) asked 42 days ago for the preferred implementation location and existing code to reuse and is still waiting. The referenced process_run in os_utils.py and the separate process.run utility both still exist, so the request is valid but needs a maintainer to scope placement and priority before work can start.

Impact: 25 Quick Win: 13.75 Staleness: 45 Complexity: 45 Confidence: 75 Support Request: 10

Issue body

> This might be nice to have upstreamed somewhere in a more general way. [craft-parts](https://github.com/canonical/craft-parts/blob/37cafc6cfd8c12afb89847fe36c409a20975e1ed/craft_parts/utils/os_utils.py#L327-L345) does a version of this prepending `":: "` to each line of output in a log (but doesn't log the command itself) that could probably be merged into this in some way, and it would be better to have some version of this for all the other places we use subprocess in our apps. _Originally posted by @lengau in https://github.com/canonical/imagecraft/pull/94#discussion_r1965726929_ The private repo that I maintain has a similar `subprocess.run` wrapping function that could make use of this as well.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 25
Quick Win: 13.75
Staleness: 45
Complexity: 45
Confidence: 75
Support Request: 10
needs triage Feature request for a general subprocess wrapper that logs the command and prefixes output lines with ':: ', consolidating craft-parts' process_run; unlabelled, a contributor asked for implementation guidance 42 days ago with no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 50
Complexity: 25
Confidence: 85
Support Request: 10
needs triage Feature request to create a reusable subprocess.run wrapper for consistent logging across the codebase. Open for over a year with a contributor recently requesting guidance to implement it.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 30
Confidence: 75
Support Request: 10
needs triage Suggestion to create a reusable wrapper for subprocess.run to improve logging and output handling. Unlabelled, inactive for over a year, with no maintainer response or triage.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 15
Confidence: 80
Support Request: 0
close stale Proposes a standardized subprocess.run wrapper to log output, inspired by craft-parts. Inactive for 482 days with zero comments. Requires triage to evaluate upstreaming and broader implementation.

Update history

Date Change
updated

Related work

  • Related To: canonical/imagecraft#94 (confidence 90%)

    Issue was originally posted from a PR review discussion in canonical/imagecraft#94, which motivated the general wrapper idea.

Related issues

No related issues found above the similarity threshold.