← Back to issue list

Improve Pydantic schema for parts

View original Github issue

Metadata

Project
craft-parts
Number
#1330
Type
issue
State
open
Author
bepri
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed

Current evaluation

Enhancement to model part properties (source-*, override-*, build/stage-packages/snaps) directly in the Pydantic schema instead of raw dicts. Triaged by a maintainer; no activity for ~11 months and the patternProperties workaround still exists in current code.

Suggested action: keep open

Reason: The issue carries 'Status: Triaged' and 'Type: Enhancement' labels from maintainer bepri, and the underlying work is demonstrably unaddressed: current HEAD of craft_parts/pydantic_schema.py still relies on patternProperties hacks (e.g. r"^override\-": {"type": "string"}) to permit these keys as raw patterns rather than typed fields. Inactivity alone is not a close reason, and the referenced TODO's workaround remains in the code, so it stays open.

Impact: 40 Quick Win: 20.0 Staleness: 70 Complexity: 50 Confidence: 80 Support Request: 0

Issue body

### What needs to get done Support part properties such as `source-*`, `override-*`, and `build/stage-packages/snaps` directly in the Pydantic schema, instead of through raw dicts. ### Why it needs to get done Spawned by the following TODO comment: https://github.com/canonical/craft-parts/blob/a20b49d1b27ecd00ab74eb786d0f2403184adc97/craft_parts/pydantic_schema.py#L101

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 40
Quick Win: 20.0
Staleness: 70
Complexity: 50
Confidence: 80
Support Request: 0
keep open Enhancement to model part properties (source-*, override-*, build/stage-packages/snaps) directly in the Pydantic schema instead of raw dicts. Triaged by a maintainer; no activity for ~11 months and the patternProperties workaround still exists in current code.
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 55
Confidence: 85
Support Request: 5
keep open Enhancement to replace raw dicts with typed Pydantic models for part properties like source-*, override-*, and build/stage-packages. Triaged but inactive for 301 days with no maintainer progress.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 45
Confidence: 75
Support Request: 5
keep open Enhancement to replace raw dicts with typed Pydantic models for craft-parts properties. Triaged but inactive for ~9.5 months with no implementation progress.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 40
Confidence: 70
Support Request: 5
keep open Replace raw dicts with dedicated Pydantic models for part properties like source, override, and build stage packages. Triaged as an enhancement but inactive for 268 days; internal Jira ticket created.

Update history

No update history recorded yet.

Related work

  • Related To: craft-parts#781 (confidence 75%)

    PR #781 ('feat: JSON schema generation for parts') introduced the Part/PartsFile schema and the TODO comment this issue was spawned from; the patternProperties workaround it added is still in HEAD.

Related issues

No related issues found above the similarity threshold.