← Back to issue list

parts: use part validator from craft-parts

View original Github issue

Metadata

Project
snapcraft
Number
#3909
Type
pull request
State
merged
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

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).

Resolution: closed resolved

Reason: The pull request itself was merged by maintainer cmatsuoka as commit 8ae29b79e "parts: use part validator from craft-parts (#3909)"; snapcraft/parts/__init__.py now imports validate_part from craft_parts and re-exports it.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Use the common part validator implemented in craft-parts to validate part data against part and plugin models, and drop the local implementation. Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `make lint`? - [ ] Have you successfully run `pytest tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved 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).
stealth/space-bunny-alpha — closed resolved Merged PR #3909 into main as commit 8ae29b79e, adopting craft-parts' shared validator for part and plugin data and removing Snapcraft's local implementation.
qwen/qwen3.6-35b-a3b — — Merged into main. Replaced the local part validator with the shared craft-parts implementation, removing 119 lines across six files. Approved by reviewers, passed CI, and increased test coverage by 0.80%.
qwen3.6-35b-a3b-mtp-q6 — — Merged into main. Replaced the local part validator with the shared implementation from craft-parts to validate part data against part and plugin models, removing the deprecated local code. Test coverage increased by 0.80%.

Update history

No update history recorded yet.

Related work

  • Related To: snapcore/snapcraft#3907 (confidence 40%)

    Same-era craft-parts integration work; earlier commit 832bd9b49 "parts: integrate craft-parts" introduced the shared parts code.

Related issues

Issue Project State Summary Similarity
#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.
81%
#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.
81%
#3636 parts: integrate craft-parts (CRAFT-765) snapcraft merged Merged as ae8467056, integrating craft-parts for project-part validation and parts lifecycle processing (CRAFT-765).
76%
#277 parts: add part validator craft-parts merged Merged in #277 as commit 67022699, adding shared part and plugin model validation to the library and resolving #176.
72%
#4635 feat(docs): pull in content from craft-parts snapcraft merged Merged #4635, importing craft-parts documentation into Snapcraft across 21 files; landed as commit 055a93543 after three approvals.
71%
#4120 requirements: update craft-parts to 1.19.3 snapcraft merged Merged PR #4120 as b4fa73795, updating Snapcraft to craft-parts 1.19.3 for the planning-phase plugin-properties state fix.
71%