← 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

snapcraft displays raw pydantic ValidationError messages on stderr instead of user-friendly formatted errors

Suggested action: needs triage

Reason: The issue has no labels, no maintainer response, and zero comments after 840 days, indicating it hasn't been triaged. The bug report is clear about the problem (raw pydantic errors vs formatted errors in logs), but requires maintainer assessment to prioritize.

Impact: 50 Quick Win: 35.0 Staleness: 85 Complexity: 30 Confidence: 60 Support Request: 10

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
qwen3.6-35b-a3b-mtp-q6
Impact: 50
Quick Win: 35.0
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 5
close stale Reports that snapcraft outputs raw Pydantic validation errors to stderr instead of user-friendly messages, with readable versions only in logs. Unlabelled and inactive for ~2 years.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.