← Back to issue list

Utility function to format partition names

View original Github issue

Metadata

Project
craft-parts
Number
#610
Type
issue
State
open
Author
lengau
Labels
Created
Updated
Closed

Current evaluation

Refactor request to extract partition-name-to-env-var translation (uppercase, +/-/ to _) into a shared utility, currently duplicated in executor/environment.py and utils/partition_utils.py. Contributor volunteered 17 days ago with a concrete plan; duplication confirmed to still exist.

Suggested action: keep open

Reason: A contributor (@gcomneno) commented 17 days ago taking the issue on, verified the duplication still exists in both _translate_partition_env() and _detect_conflicts(), and proposed a behavior-preserving refactor with unit coverage. I confirmed via source inspection that both code paths still independently apply the same translation, so the issue is valid, scoped, and actively being worked on.

Impact: 30 Quick Win: 22.5 Staleness: 10 Complexity: 25 Confidence: 90 Support Request: 0

Issue body

### What needs to get done Basically this as a utility function: https://github.com/snapcore/snapcraft/pull/4493/files#diff-81bf1b8cfa88289a0432d3e12f4b4c1c104d4463a49dbc0e6c431d4e444a35cdR541-R544 ### Why it needs to get done We've got this code in multiple places and more will probably come. If this changes we'd have to change it in downstream apps. cc @mr-cal

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 30
Quick Win: 22.5
Staleness: 10
Complexity: 25
Confidence: 90
Support Request: 0
keep open Refactor request to extract partition-name-to-env-var translation (uppercase, +/-/ to _) into a shared utility, currently duplicated in executor/environment.py and utils/partition_utils.py. Contributor volunteered 17 days ago with a concrete plan; duplication confirmed to still exist.
qwen/qwen3.6-35b-a3b
Staleness: 20
Complexity: 15
Confidence: 90
Support Request: 0
keep open Request to extract partition name formatting logic into a shared utility to reduce code duplication. A contributor recently volunteered to implement a behavior-preserving refactor, making it an active, actionable task.
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 20
Confidence: 80
Support Request: 10
close stale Proposes extracting a partition name formatting utility function to reduce code duplication across the codebase and downstream apps. Currently inactive with no maintainer follow-up or labels.
qwen3.6-35b-a3b-mtp-q6
Staleness: 92
Complexity: 15
Confidence: 85
Support Request: 0
needs triage Request to extract a partition name formatting utility function to reduce code duplication. Unlabelled, inactive for over a year, awaiting maintainer assessment.
qwen3.6-35b-a3b-mtp-q6
Staleness: 80
Complexity: 20
Confidence: 80
Support Request: 0
needs triage Extract duplicated partition name formatting logic into a shared utility function to reduce maintenance overhead. Currently open, with an internal Jira ticket created, awaiting triage and assignment.

Update history

Date Change
updated

Related work

  • Related To: snapcore/snapcraft#4493 (confidence 80%)

    The issue body cites this snapcraft PR as the origin of the duplicated translation code to be centralized.

Related issues

No related issues found above the similarity threshold.