← Back to issue list

parts: add part validator

View original Github issue

Metadata

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

Current evaluation

Merged in #277 as commit 67022699, adding shared part and plugin model validation to the library and resolving #176.

Resolution: closed resolved

Reason: PR #277 was approved and merged, adding a reusable validator that validates part data against common and plugin models. The commit fixes issue #176.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Add a part validation helper that validates part data against the part and plugin models. Currently all craft tools validate part data, so do it in the library instead of implementing a validator in each application. Fixes #176. 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 in #277 as commit 67022699, adding shared part and plugin model validation to the library and resolving #176.
stealth/space-bunny-alpha — closed resolved Merged PR #277 (67022699), adding shared part and plugin data validation to craft-parts and fixing #176 by centralizing validation in the library.
qwen/qwen3.6-35b-a3b — — Merged adds a centralized part validation helper that validates data against part and plugin models, replacing per-tool logic. Approved, passed CI, and resolves issue #176.
qwen3.6-35b-a3b-mtp-q6 — — Merged addition of a centralized part validation helper for part and plugin models, replacing per-tool implementations and resolving issue #176.

Update history

No update history recorded yet.

Related work

  • Related To: craft-parts#176 (confidence 100%)

    The validation-helper issue explicitly resolved by PR #277.

  • Related To: snapcraft#3909 (confidence 98%)

    Merged downstream change replaced Snapcraft's local validator with craft_parts.validate_part.

Related issues

Issue Project State Summary Similarity
#93 lifecycle: add part validator (CRAFT-367) craft-parts closed Closed unmerged; shared part validation was later added through PR #277 as commit 67022699, replacing this lifecycle-specific approach.
75%
#176 Craft-parts should provide a part validation helper craft-parts closed Shared part validation was added by craft-parts PR #277, merged as commit 67022699; Snapcraft later adopted it in canonical/snapcraft#3909.
72%
#70 parts: use part validator from craft-parts rockcraft merged Merged PR #70 as 3daa2224: rockcraft now uses craft-parts' shared part validator (from craft-parts#277 / 67022699) instead of its own local implementation, dropping the duplicate code.
72%
#3909 parts: use part validator from craft-parts snapcraft merged Merged PR #3909 (commit 8ae29b79e) replaced snapcraft's local part validator with craft_parts.validate_part in snapcraft/parts/__init__.py, dropping the local implementation (+7/-119 across 6 files).
72%
#514 Fail validation if plugs or slots are declared at the part level snapcraft merged PR #514 was merged as commit 6fabd20bc, adding validation that rejects plugs or slots declared inside parts.
71%