← Back to issue list

snapcraft.yaml validation errors are presented in a very user unfriendly way

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2066040
Type
issue
State
open
Author
~jamesh
Labels
—
Created
Updated
Closed
—

Current evaluation

A core24 snapcraft.yaml error leaked raw Pydantic details; current code has friendlier validation paths, but the exact regression and its resolution are not confirmed.

Suggested action: needs triage

Reason: The report includes exact stderr and log output, but the missing snapcraft.yaml fragment leaves some reproduction ambiguity. It has no labels, assignee, or maintainer response; although SnapcraftBuildPlanner is absent from current source and tests now expect friendly Bad snapcraft.yaml content diagnostics, no explicit reference confirms that this exact failure was fixed.

Evaluated by: mr-cal-bot

Impact: 40 Quick Win: 20 Complexity: 34 Confidence: 76 Actionability: 74

Issue body

When updating a snap to use core24, I ran into one of the syntax changes and received the following error message: $ snapcraft snapcraft internal error: ValidationError(model='SnapcraftBuildPlanner', errors=[{'loc': ('architectures', 0), 'msg': 'str type expected', 'type': 'type_error.str'}, {'loc': ('architectures', 0, 'run-on'), 'msg': 'extra fields not permitted', 'type': 'value_error.extra'}]) Full execution log: '/home/james/.local/state/snapcraft/log/snapcraft-20240517-140421.326386.log' Checking the full execution log showed the following near the bottom: 2024-05-17 14:04:21.444 pydantic.error_wrappers.ValidationError: 2 validation errors for SnapcraftBuildPlanner 2024-05-17 14:04:21.444 architectures -> 0 2024-05-17 14:04:21.444 str type expected (type=type_error.str) 2024-05-17 14:04:21.444 architectures -> 0 -> run-on 2024-05-17 14:04:21.444 extra fields not permitted (type=value_error.extra) It seems like a bug that the more user friendly presentation of the error would be saved for the log file, and the more obscure form printed to stderr.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 40
Quick Win: 20
Complexity: 34
Confidence: 76
Actionability: 74
needs triage A core24 snapcraft.yaml error leaked raw Pydantic details; current code has friendlier validation paths, but the exact regression and its resolution are not confirmed.
stealth/space-bunny-alpha
Impact: 36
Quick Win: 16
Complexity: 30
Confidence: 79
Actionability: 65
needs triage Core24 projects expose raw Pydantic errors on stderr instead of readable snapcraft.yaml diagnostics; the report remains open and untriaged after 860 days.
qwen3.6-35b-a3b-mtp-q6
Impact: 50
Quick Win: 35
Staleness: 85
Complexity: 30
Confidence: 60
Support Request: 10
needs triage snapcraft displays raw pydantic ValidationError messages on stderr instead of user-friendly formatted errors
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 90
Support Request: 5
needs triage snapcraft prints raw Pydantic ValidationError to stderr instead of a user-friendly message. The issue is unlabelled, has no comments, and has been inactive for over two years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 85
Support Request: 10
needs triage CLI prints raw Pydantic ValidationError to stderr instead of a user-friendly message; friendly version only in logs. Unlabeled and unresponded to for ~2 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 30
Confidence: 85
Support Request: 10
needs triage Reports raw Pydantic validation errors printed to stderr instead of user-friendly messages. Unlabeled, no maintainer response, inactive for over two years.

Update history

Date Change
created

Related work

  • Caused By: snapcraft#4630 (confidence 78%)

    Commit f771a4ab8 added platforms and removed architectures for core24, matching the syntax migration that triggered the report.

  • Related To: snapcraft#5043 (confidence 64%)

    Commit 19699c1b8 corrected build-plan build-on and build-for types and may cover the affected validation path, but it is not explicitly linked to this report.

Related issues

No related issues found above the similarity threshold.