← Back to issue list

"snapcraft plugins" (latest/stable) chokes on parsing "extensions" line

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2002405
Type
issue
State
closed
Author
~rpjday
Labels
craft-1567
Created
Updated
Closed

Current evaluation

Fixed in #4035 by correcting how snapcraft.yaml is parsed before listing plugins, resolving validation errors caused by extensions.

Resolution: closed resolved

Reason: The issue was resolved by PR #4035, which fixed the parsing logic for the `snapcraft plugins` command to handle extensions correctly.

Evaluated by: mr-cal-bot

No scores available.

Issue body

With snapcraft latest/stable (Rev 8619), simply asking to list plugins with "snapcraft plugins" in a project with an "extensions:" line in snapcraft.yaml produces (log file): 2023-01-10 13:31:36.747 Starting Snapcraft 7.2.9 2023-01-10 13:31:36.766 Bad snapcraft.yaml content: - extra field 'extensions' not permitted in 'apps.proto-device-application' configuration 2023-01-10 13:31:36.780 Traceback (most recent call last): 2023-01-10 13:31:36.780 File "/snap/snapcraft/8619/lib/python3.8/site-packages/snapcraft/projects.py", line 567, in unmarshal 2023-01-10 13:31:36.780 project = Project(**data) 2023-01-10 13:31:36.780 File "pydantic/main.py", line 331, in pydantic.main.BaseModel.__init__ 2023-01-10 13:31:36.780 pydantic.error_wrappers.ValidationError: 1 validation error for Project 2023-01-10 13:31:36.780 apps -> proto-device-application -> extensions 2023-01-10 13:31:36.780 extra fields not permitted (type=value_error.extra) 2023-01-10 13:31:36.780 Full execution log: '/home/ubuntu/.cache/snapcraft/log/snapcraft-20230110-133136.746097.log' Thread in channel here, where someone else confirms: https://chat.canonical.com/canonical/channels/starcraft/pgjhyatkefb67ds7gxm9p8h7ra

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b — closed resolved Fixed in #4035 by correcting how snapcraft.yaml is parsed before listing plugins, resolving validation errors caused by extensions.
stealth/space-bunny-alpha
Impact: 34
Quick Win: 22
Complexity: 28
Confidence: 90
Actionability: 90
close resolved Snapcraft 7.2.9's plugins command rejected valid app-level extensions; current revision e766db5 no longer forwards the project spec to craft-parts, resolving the reported root cause.
stealth/space-bunny-alpha
Impact: 38
Quick Win: 26
Complexity: 28
Confidence: 99
Actionability: 95
close resolved snapcraft plugins failed on valid app-level extensions; PR #4035 fixed it by preprocessing project YAML before unmarshalling.
stealth/space-bunny-alpha
Impact: 40
Quick Win: 29
Complexity: 25
Confidence: 98
Actionability: 96
close resolved Snapcraft 7.2.9's plugins command rejects valid app-level extensions during project validation; merged PR #4035 fixes YAML preprocessing in the current implementation.
qwen3.6-35b-a3b-mtp-q6
Impact: 60
Quick Win: 36
Staleness: 80
Complexity: 40
Confidence: 60
Support Request: 10
needs triage Snapcraft 7.2.9 fails to parse snapcraft.yaml with extensions field, throwing pydantic validation error about extra fields in apps configuration
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 85
Support Request: 10
close stale Snapcraft 7.2.9 fails to parse extensions in snapcraft.yaml during plugin listing, throwing a Pydantic validation error. Issue is over 3.5 years old with zero maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 95
Support Request: 0
close stale Bug report: snapcraft plugins fails parsing extensions line in snapcraft.yaml due to validation error. Issue is over 3 years old with no activity.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 30
Confidence: 80
Support Request: 10
close stale Snapcraft 7.2.9 fails to parse snapcraft.yaml containing an extensions line, throwing a Pydantic validation error. The report is over three years old with no maintainer response or follow-up.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft#4035 (confidence 90%)

    Commit d4540670e in PR #4035 addresses parsing snapcraft.yaml before listing plugins.

Related issues

Issue Project State Summary Similarity
#4035 plugins: parse snapcraft.yaml before listing plugins snapcraft merged Merged PR #4035 as commit d454a670e, parsing snapcraft.yaml before plugin listing so core22 projects using extensions, parse-info, or advanced grammar work correctly.
77%
#4110 extensions: parse snapcraft.yaml before expanding extensions snapcraft merged Merged #4110 (commit 51ca1524b): expand-extensions now parses snapcraft.yaml before expansion, fixing valid core22 files that use parse-info and advanced grammar keywords.
74%
#1644678 Default snapcraft.yaml file incorrectly suggests I run 'snapcraft plugins' snapcraft (launchpad) closed Report that `snapcraft init` generated "See 'snapcraft plugins'" but no such command exists. Fixed by PR #959 (commit df525d781), which made `plugins` an alias of `list-plugins`, so the hint works as written.
70%