← Back to issue list

Validate snapd payload

View original Github issue

Metadata

Project
craft-parts
Number
#838
Type
issue
State
open
Author
sergiusens
Labels
Created
Updated
Closed

Current evaluation

Task to validate snapd API return payloads in craft_parts/packages/snaps.py to prevent TypeError crashes when result is None. Filed by maintainer, unlabelled, unassigned, inactive 538 days; code still lacks validation.

Suggested action: keep open

Reason: Filed by maintainer sergiusens as a clearly scoped task with a concrete reproducer (TypeError on NoneType subscriptable at line 295). The current code in _get_local_snap_info and _get_store_snap_info still uses cast(dict, snap_info.json()["result"]) without validating the result is actually a dict, so the issue remains valid. No labels or assignee, but maintainer buy-in is implicit from authorship.

Impact: 45 Quick Win: 29.25 Staleness: 75 Complexity: 35 Confidence: 75 Support Request: 0

Issue body

### What needs to get done We need to validate the snapd API return payload in craft_parts/packages/snaps.py ### Why it needs to get done This will allow us to gracefully handle errors such as ``` File "/snap/snapcraft/12504/lib/python3.10/site-packages/snapcraft_legacy/internal/repo/snaps.py", line 295, in install_snaps snap_pkg_channel = snap_info["channel"] TypeError: 'NoneType' object is not subscriptable ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 45
Quick Win: 29.25
Staleness: 75
Complexity: 35
Confidence: 75
Support Request: 0
keep open Task to validate snapd API return payloads in craft_parts/packages/snaps.py to prevent TypeError crashes when result is None. Filed by maintainer, unlabelled, unassigned, inactive 538 days; code still lacks validation.
qwen/qwen3.6-35b-a3b
Staleness: 80
Complexity: 20
Confidence: 75
Support Request: 0
needs triage Task to validate snapd API payloads in craft_parts to prevent NoneType errors during snap installation. Currently unlabelled, unassigned, and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 20
Confidence: 85
Support Request: 0
needs triage Task to add payload validation to snapd API calls in craft_parts/packages/snaps.py to prevent NoneType errors. Currently unlabelled, unassigned, and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 25
Confidence: 75
Support Request: 10
needs triage Add validation for snapd API payloads in craft_parts/packages/snaps.py to prevent NoneType errors. Currently unassigned, untriaged, and awaiting work with no recent activity.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.