← Back to issue list

errors: reformat pydantic validation error (CRAFT-368)

View original Github issue

Metadata

Project
craft-parts
Number
#94
Type
pull request
State
merged
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #94 (commit33a49dce, merged as e209ddee) reformatted pydantic validation errors into human-readable bullets in craft_parts/errors.py.

Resolution: closed resolved

Reason: PR #94 by cmatsuoka was merged into main (merge commit e209ddee 'Merge pull request #94 from cmatsuoka/fix/reformat-pydantic-validation-error'), landing commits 33a49dce 'errors: reformat pydantic validation error' and a68fa508 'errors: update pydantic validation error tests'. The new formatting ('- extra field \'baz\' not permitted', etc.) is present in craft_parts/errors.py at current HEAD.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Change formatting of pydantic errors to be more human-readable. The new format is similar to the one used in Charmcraft. Specifically, this changes ``` 'foo',1: some error happened 'bar': field required 'baz': extra fields not permitted ``` to ``` - some error happened in field 'foo[1]' - field 'bar' is required' - extra field 'baz' not permitted ``` Co-authored-by: Chris Patterson <chris.patterson@canonical.com> Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #94 (commit33a49dce, merged as e209ddee) reformatted pydantic validation errors into human-readable bullets in craft_parts/errors.py.
stealth/space-bunny-alpha — closed resolved Merged PR #94 in e209ddee (33a49dce), making Pydantic validation errors more readable while leaving application-specific formatting to Charmcraft.
qwen/qwen3.6-35b-a3b — — Merged after reviewer approval and passing CI. Reformatted Pydantic validation errors for improved readability. Centralized formatting in charmcraft while preserving standalone craft-parts error handling.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Reformatted pydantic validation errors for better readability. Formatting was centralized in charmcraft to avoid duplication. The PR was held pending final craft-parts integration to prevent error leakage before merging.

Update history

No update history recorded yet.

Related work

  • Related To: craft-parts#107 (confidence 35%)

    Later commit 93589e1a 'errors: update pydantic validation error checking' further extended this same error-formatting code, indicating direct continuation of this work.

Related issues

Issue Project State Summary Similarity
#167 errors: update pydantic validation error checking (CRAFT-788) craft-parts merged Merged PR #167 updated validation error handling for Pydantic 1.9 ErrorDict data in commit 93589e1a; merge commit ae183854.
78%