← Back to issue list

Improve platform validation error message

View original Github issue

Metadata

Project
craft-application
Number
#347
Type
issue
State
open
Author
cmatsuoka
Labels
—
Created
Updated
Closed
—

Current evaluation

Platform validation now produces user-facing CraftValidationError messages, while the affected BuildPlanner model was removed in 5.0.0; the issue appears resolved.

Suggested action: close resolved

Reason: Current ProjectService.get_platforms() catches pydantic.ValidationError and converts it through CraftValidationError.from_pydantic(), preventing malformed build-on values from reaching the generic internal-error logger; commit da6d517c normalized validation errors. Release 5.0.0 also replaced BuildPlanner with BuildPlanService, removing the model and code path named in the report.

Evaluated by: mr-cal-bot

Impact: 40 Quick Win: 17 Complexity: 45 Confidence: 88 Actionability: 76

Issue body

### What needs to get done Display better validation error messages to the user when platforms are not correctly defined. This is a follow-up to # ### Why it needs to get done This is the current validation error message: ``` wheelcraft internal error: ValidationError(model='BuildPlanner', errors=[{'loc': ('platforms', 'build-on'), 'msg': 'value is not a valid list', 'type': 'type_error.list'}]) ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 40
Quick Win: 17
Complexity: 45
Confidence: 88
Actionability: 76
close resolved Platform validation now produces user-facing CraftValidationError messages, while the affected BuildPlanner model was removed in 5.0.0; the issue appears resolved.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 13
Complexity: 30
Confidence: 70
Actionability: 60
needs triage Improve platform validation error messages. Current error exposes raw Pydantic validation details to users. Issue is unlabelled with no maintainer response.
qwen/qwen3.8-27b
Impact: 40
Quick Win: 26
Staleness: 72
Complexity: 35
Confidence: 60
Support Request: 10
needs triage Request to improve the cryptic pydantic validation error shown when platforms/build-on is malformed in a craft project file. No maintainer response or labels; only an auto Jira-sync comment. Current code already converts pydantic errors via CraftValidationError.from_pydantic, so the raw message may be outdated.
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 10
Confidence: 80
Support Request: 0
needs triage Improve validation error messages for platform definitions to replace raw Pydantic output. Open for over two years with no maintainer triage or follow-up beyond a Jira sync bot.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 15
Confidence: 80
Support Request: 10
needs triage Improve platform validation error messages to replace raw Pydantic errors with user-friendly text. Open for over two years with no labels, assignee, or maintainer assessment.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#502 Refactor platform validation rockcraft open Refactor platform validation by consolidating it in Project and removing BuildPlanner. Resolved via migration to craft-application 5.
75%
#4650 Refactor `platform` validation snapcraft closed Closed as completed after platform validation was refactored and the build planner moved to the craft-application 5 and craft-platforms architecture.
73%